Are ARG variables persisted into the built images in Docker?
Experience Level: Senior
Tags: Docker
Answer
ARG variables are not persisted into the built image as ENV variables are.
Related Docker job interview questions
How can you split a long RUN instruction on multiple lines in Dockerfile?
Docker SeniorWhat is the RUN instruction good for in Docker?
Docker SeniorYou have a variable declared using ARG and the same variable declared using ENV instruction in your Dockerfile. What variable value will be used?
Docker SeniorWhat is the scope of a variable defined using the ARG instruction within a Dockerfile?
Docker SeniorHow do you provide default values for variables defined using ARG instruction in Dockerfile?
Docker Senior