ARG consumer-key
ARG consumer-secret
ENV COMPOSER_AUTH '{ "bitbucket-oauth": { "bitbucket.org": { "consumer-key": "${consumer-key}", "consumer-secret": "${consumer-secret}" } } }'
docker build \
--build-arg consumer-key=test \
--build-arg consumer-secret=test \
.
The values of consumer-key and consumer-secret are not replaced with the build arguments