Complete the Dockerfile line to declare a build-time variable named VERSION.
ARG [1]The ARG instruction declares a build-time variable. Here, VERSION is the variable name.
Complete the Dockerfile line to set an environment variable named PATH inside the container.
ENV [1]=/usr/local/binThe ENV instruction sets environment variables inside the container. Here, PATH is set to /usr/local/bin.
Fix the error in this Dockerfile line that tries to use a build argument inside ENV.
ENV APP_VERSION=[1]To use a build argument inside an ENV instruction, you reference it with ${APP_VERSION}. This syntax expands the argument value.
Fill both blanks to declare a build argument and set it as an environment variable with a default value.
ARG [1]=1.0 ENV [2]=$[1]
The build argument is declared as VERSION with a default value. Then ENV sets the environment variable VERSION using the argument's value.
Fill all three blanks to create a Dockerfile snippet that declares a build argument, sets an environment variable, and uses it in a RUN command.
ARG [1]=latest ENV [2]=$[1] RUN echo "Version is [3]"
The build argument APP_TAG is declared with a default. The environment variable APP_TAG is set from it. The RUN command uses $APP_TAG to print the version.