I have a build time Argument with which I would like to build my Docker file; Since that argument is confidential in nature (github key of a private repo) I don\'t want that
With docker 18.09+, that will be: docker build --secret id=mysecret,src=/secret/file
(using buildkit).
See PR 1288, announced in this tweet.
--secret
is now guarded by API version 1.39.
Example:
printf "hello secret" > ./mysecret.txt
export DOCKER_BUILDKIT=1
docker build --no-cache --progress=plain --secret id=mysecret,src=$(pwd)/mysecret.txt -f - . <