Workaround to docker run “--env-file” supplied file not being evaluated as expected

后端 未结 6 1313
你的背包
你的背包 2021-02-05 23:58

My current setup for running a docker container is on the lines of this:

  1. I\'ve got a main.env file:
# Main
export PRIVATE_IP=\\`echo          


        
6条回答
  •  面向向阳花
    2021-02-06 00:06

    Both --env and --env-file setup variables as is and do not replace nested variables.

    Solomon Hykes talks about configuring containers at run time and the the various approaches. The one that should work for you is to volume mounting the main.env from host into the container and sourcing it.

提交回复
热议问题