How to Pass an Environment Variable to the Docker Container #951
-
I tried using sudo docker run -e PWPUSH_MASTER_KEY=0c110f7f9d93d2122f36debf8a24bf835f33f248681714776b336849b801f693 (with a key from the helper tool) but got the following error
As I meet this requirement, I am not sure what I am doing wrong. Is there a better way to do this or how do I correct the above? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
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 The specific problem with the command you posted above is that the 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. |
Beta Was this translation helpful? Give feedback.
-
For the life of me I can't get the solar theme to work I just downloaded my docker image on Friday. Do I need to put the theme directive in a different place on the command string? |
Beta Was this translation helpful? Give feedback.
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.