You have a variable declared using ARG and the same variable declared using ENV instruction in your Dockerfile. What variable value will be used?

Experience Level: Senior
Tags: Docker

Answer

You can use an ARG or an ENV instruction to specify variables that are available to the RUN instruction. Environment variables defined using the ENV instruction always override an ARG instruction of the same name.

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