Skip to content

How to Pass an Environment Variable to the Docker Container #951

Answered by pglombardo
ZuluPilgrim asked this question in Q&A
Discussion options

You must be logged in to vote

If you have a lot of environment variables to set, you can use a Docker environment file.

So either do modifications via environment variables or a custom settings.yml.

The specific problem with the command you posted above is that the -e option is used when launching a container. There was no container specified on the command line.

Here's another command line example with an environment variable:

docker run -d --env PWP__DEFAULT_LOCALE=nl -p "5100:5100" pglombardo/pwpush-ephemeral:release

I know this is a lot of information and Docker isn't the easiest software in the world. But after some time, I'm sure you'll get it. Once Docker is understood and is working, it's extremely reliable.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@ZuluPilgrim
Comment options

@pglombardo
Comment options

@ZuluPilgrim
Comment options

@pglombardo
Comment options

Answer selected by ZuluPilgrim
Comment options

You must be logged in to vote
2 replies
@CBB3810
Comment options

@pglombardo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants