docker build --secret id=mysecret,src=./secret.txt .
Category: Docker
docker build --secret id=mysecret,src=./secret.txt .
Pass a build-time secret file without baking it into a layer
Passes a secret file to the build without baking its contents into any image layer — secure for API keys.