AliyunContainerService/pouch

pouch run support --env-file

Closed this issue · 2 comments

Why you need it?

We have some users that want to use pouch but need pouch run command support --env-file to read in a file of environment variables when creating a container.

env-file may be a common flag that can be used in both pouch create and pouch run command.

How it could be?

Other related information

Ⅱ. Describe what happened

# ./bin/pouch run --env-file=/home/abc -d busybox top
Error: unknown flag: --env-file

Ⅲ. Describe what you expected to happen

# cat /home/abc
env_var_name=another_value


# pouch run --env-file=/home/abc -d busybox top
b2f0df7176e9459441276c7470ad95ae701329b49ff2709344706316597ce639


[root@vm_centos pouch]# pouch exec b2f0df7176e9459441276c7470ad95ae701329b49ff2709344706316597ce639 env | grep env_var_name
env_var_name=another_value

#dibs