docker:security:don_t_leak_sensitive_information_to_docker_images
This is an old revision of the document!
Docker - Security - Don’t leak sensitive information to docker images
It’s easy to accidentally leak secrets, tokens, and keys into images when building them.
To stay safe, follow these guidelines:
- Use multi-stage builds.
- Use the Docker secrets feature to mount sensitive files without caching them (supported only from Docker 18.04).
- Use a .dockerignore file to avoid a hazardous COPY instruction, which pulls in sensitive files that are part of the build context.
docker/security/don_t_leak_sensitive_information_to_docker_images.1587238397.txt.gz · Last modified: 2020/07/15 09:30 (external edit)