The environment variables declared using the ENV or ARG instruction can be used in the ADD, COPY, ENV, EXPOSE, LABEL, USER, WORKDIR, VOLUME, STOPSIGNAL, and ONBUILD instructions.
Here is an example of the environment variable usage:
ARG BUILD_VERSION
LABEL com.example.app.build_version=${BUILD_VERSION}