Today I was initially struggling to build a container image using Docker BuildKit, via : -
DOCKER_BUILDKIT=1 docker build
and was somewhat confused by a reference to to : -
cat /run/secrets/SECRET.TXT
in the Dockerfile, given that I didn't have a file called /run/secrets/SECRET.TXT.
Thankfully, this article came to my rescue: -
Don’t leak your Docker image’s build secrets
where I use a new ( to me ) Docker CLI argument - --secret - to specify the ID of, and path, to the file on my local file-system that contains the secret.
Easy when you know ?
No comments:
Post a Comment