-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nerdctl: add --env-file
to exec
#413
Conversation
&cli.StringSliceFlag{ | ||
Name: "env-file", | ||
Usage: "Set environment variables from file", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the document?
https://github.com/containerd/nerdctl#whale-nerdctl-exec
Thanks, LGTM except the document.
|
Updated docs. PTAL
|
README.md
Outdated
@@ -480,6 +480,7 @@ Flags: | |||
- :whale: `-d, --detach`: Detached mode: run command in the background | |||
- :whale: `-w, --workdir`: Working directory inside the container | |||
- :whale: `-e, --env`: Set environment variables | |||
- :whale: `--env-file`: Set environment variables from file | |||
- :whale: `--privileged`: Give extended privileges to the command | |||
|
|||
Unimplemented `docker exec` flags: `--detach-keys`, `--env-file`, `--user` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env-file can be now removed from “Unimplemented” list
Reference: containerd#215 ```shell vbatts@melisma:~$ sudo nerdctl --version nerdctl version 0.12.0-6-g6ca74e6.m vbatts@melisma:~$ sudo nerdctl exec -it --env FOO=bar farts sh HOME=/root TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin FOO=bar PWD=/ vbatts@melisma:~$ cat > env.sh FOO=VAT vbatts@melisma:~$ sudo nerdctl exec -it --env-file ./env.sh farts sh HOME=/root TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin FOO=VAT PWD=/ vbatts@melisma:~$ cat > env.sh FOO=bar Bif=BAZ vbatts@melisma:~$ sudo nerdctl exec -it --env-file ./env.sh farts sh Bif=BAZ HOME=/root TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin FOO=bar PWD=/ BAZ ``` Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
env-file can be now removed from “Unimplemented” list
ah yeah. Fixed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Reference: #215
Signed-off-by: Vincent Batts vbatts@hashbangbash.com