Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

Will the variables set using the ENV instruction in a Dockerfile be persisted in the built image?

Experience Level: Senior
Tags: Docker

Answer

Yes. The environment variables set using ENV will persist when a container is run from the resulting image.

Comments

No Comments Yet.
Be the first to tell us what you think.
Docker instructions
Docker instructions

Are you learning Docker ? Try our test we designed to help you progress faster.

Test yourself