Ability to create environment variables/file for use in Docker containers


Recommended Posts

Similar to how you can create a .env file when using docker-compose, in other projects I would put a number of variables in here that I could use across a number of containers and reference them with ${VARIABLE_NAME}

 

I use Traefik as my reverse proxy, setting up all those labels was a bit time consuming, setting up new containers would be simplified if I could have label values stored as variables that I could reference. If I ever change my host, I have a LOT of containers to update vs updating a single variable

Also when testing mysql containers with predefined username and password. I'm sure there are plenty more use cases

 

A small section on the Docker tab to allow managing of variables, and then of course the ability to then use them when creating/editing a container

 

In addition, Docker also allows using a file with the --env-file option, I know I could do this up manually but a nice front end to create/manage them would be handy.. but perhaps asking to much now 

 

https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e-env-env-file

Edited by eldorado
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.