How to reload environment variables file in a running Docker container

11,683

It's currently not possible. Check this and this.

See if using docker commit to save the state and create a new instance will fit your situation.

Share:
11,683
Mulkave
Author by

Mulkave

Updated on September 18, 2022

Comments

  • Mulkave
    Mulkave over 1 year

    I have a running container with an environment variables file mounted as such:

    docker run -d --env-file ./env.list my/image and everything is working well, now I have updated my ./env.list file and would like the updated files to be reflected. Tried restarting the container but that didn't work.

  • Mulkave
    Mulkave over 9 years
    Thanks for the references, pretty helpful. Unfortunately the only way is to re-run the container for now.