`ARG` vs `ENV`?
BeginnerConceptDockerfile Instructions & Builds
Answer
ARG exists only at build time (set with --build-arg) and is not in the running container's environment. ENV persists into the image and every container. An ARG before FROM is only available in FROM lines unless redeclared inside the stage. Both are visible in image metadata.