Build-Time Versus Run-Time Values
ARG is primarily available during image build. ENV persists as image metadata and is available to the running process unless overridden at runtime.
Do not put passwords, API keys, or private tokens into Dockerfiles or image layers. Build arguments are not a secure secret store. Use runtime secret mechanisms or your deployment platform's secret manager.