Where is the environment variables mentioned in the docker file being written inside the docker image ? Is there something like bash_profile or .bashrc inside the docker image?
Asked
Active
Viewed 53 times
1 Answers
1
No, the environment created by Docker is kept inside Docker but outside the image. You can use docker inspect
and related tools to inspect it from outside the image, but from the inside, you can only access the innards of the container.
To simply override something, use the image's native facilities. On Linux, for example, to override FOO, just
export FOO=newvalue
(The export
is often cargo-culted to places where it doesn't matter. Its significance is to make the value visible to child processes of the shell where you execute it.)

tripleee
- 175,061
- 34
- 275
- 318