Mount Secure Build-Time Secrets with Docker and Docker Compose

preview_player
Показать описание
Avoid leaking build-time secrets in your Docker images such as API keys or tokens.

Hit the subscribe button to receive more videos like this!

REFERENCE LINKS
---------------------------------------------------

COURSES
---------------------------------------------------
Courses I've created that focus on web dev and deployment topics.

THE TOOLS I USE / GEAR
---------------------------------------------------

FOLLOW ME ELSEWHERE
---------------------------------------------------

TIMESTAMPS
---------------------------------------------------
0:00 -- Intro
0:37 -- A couple of use cases
1:43 -- An insecure way with build ARGs
6:14 -- Make sure BuildKit is enabled
6:49 -- Mounting a secure env variable secret
11:26 -- Does it actually work?
14:04 -- Passing it as an env var for a command
15:12 -- Adding multiple secrets
16:02 -- Mounting files instead of env vars
18:43 -- Using Docker Compose for secret env vars
23:13 -- Using Docker Compose for secret files and configs
Рекомендации по теме
Комментарии
Автор

thanks for the fast introduction to docker secrets it helped a lot! 😁

Patrick-wd
Автор

Hey m8. I find your article really helpful nonetheless.I have the issue that each time I confirm through a echo $MY_VAR in the CMD step doesn't show any value after even correctly make the step of tthe secret mounting.

Tigersoulification
Автор

That replaces WSUS with great restrictions, but that is improving update latency hopefully

berndeckenfels
Автор

Has anyone been able to do this with docker-compose and using the following command

docker secret create secret-name secret-value - ?

So using secrets that you create with that command in your compose and then mounting in your dockerfile.

Mainly asking for local development purposes and Id rather not use a .env, or export them in my shell, or create a file. I just want to use the secret create command with the name and value.

TY in advance.

BlakeWatts-to