nerdctl - environment variables not passed from host to container (-e) #1279
Labels
area/preferences
component/lima
Issues related to lima and qemu
kind/bug
Something isn't working
platform/macos
Milestone
Rancher Desktop Version
0.7.1
Rancher Desktop K8s Version
1.23.1
What operating system are you using?
macOS
Operating System / Build Version
macOS Big Sur 11.6.2
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
No response
Actual Behavior
When running a container with nerdctl, the environment variables are not passed to the container unless the value is explicitly defied in the run command.
nerdctl run -ti -e FOO=bar alpine env
% export BAR=foo
% nerdctl run -ti -e BAR alpine env
I have tried on debian as well and received the same result.
Steps to Reproduce
% export BAR=foo
% nerdctl run -ti -e BAR -e FOO=bar alpine env
Result
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
FOO=bar
TERM=xterm
HOME=/root
Expected Behavior
The expected behavior is that the env set on the host (BAR) would be passed to the container by specifying "-e BAR" in the run command.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
BAR=foo
FOO=bar
TERM=xterm
HOME=/root
Additional Information
Possibly related to #1267 but the main focus on that issue is related to proxies.
The text was updated successfully, but these errors were encountered: