ARG values won't be available after the image is built, so a running container won’t have access to those values. YouTo dynamically set an env variable, you can usecombine both ENVARG and have something likeENV (since ENV can't be overridden):
ARG PATH ENV P=${PATH} CMD target/universal/rule_engine-1.0/bin/rule_engine -Dconfig.file=$P For further explanation, I recommend this article, which explains the difference between ARG and ENV in a clear way:
As you can see from the above image, the ARG values are available only during the image build.
