I need to pass env to docker container I see it we have command kamal env push but it does not seems to push the file inside roles is always empty. #563
-
I need to pass env to docker container I see it we have command kamal env push but it does not seems to push the file inside roles is always empty. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Check here Any env var that you'd need it to be passed to the containers, needs to be declared under 'env' section in your
|
Beta Was this translation helpful? Give feedback.
-
@ahsan-eazyops It doesn't actually push the file into the container, it just runs the container with the Docs: https://docs.docker.com/engine/reference/commandline/run/#env |
Beta Was this translation helpful? Give feedback.
@ahsan-eazyops It doesn't actually push the file into the container, it just runs the container with the
--env-file
option pointing at that .env file. The .env file is actually sitting on the server in a Kamal directory, if you look at the output fromkamal env push
you'll see where it stores it for that role + server.Docs: https://docs.docker.com/engine/reference/commandline/run/#env