Environmental Variables in docker

  docker, question
[root@wuyong opt]# docker run -it -e PARAM="-m -pwd wuyong -webport 58080" --restart=on-failure --net=host  qkdny:1.0 env
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 HOSTNAME=wuyong
 TERM=xterm
 PARAM=-m -pwd wuyong -webport 58080
 HOME=/root

Env command can get environment variable PARAM

[root@wuyong opt]# docker run -it -e PARAM="-m -pwd wuyong -webport 58080" --restart=on-failure --net=host  qkdny:1.0 echo $PARAM

There is no direct printing! ! ! There was also an error in the call in the script.

[root@wuyong opt]# docker run -it -e PARAM="-m -pwd wuyong -webport 58080" --restart=on-failure --net=host  qkdny:1.0 echo $HOME
 /root

Other environment variables can be obtained.

……….