4 ms·
> Using ENV to store secrets is bad practice because Dockerfiles are usually distributed with the application Nevermind Dockerfiles, env variables are preserve
by xaduha 6y ago
> Using ENV to store secrets is bad practice because Dockerfiles are usually distributed with the application
Nevermind Dockerfiles, env variables are preserved in stopped containers that are hanging around even when you use docker-machine AFAIK, you can easily `docker inspect` them.
- tsumnia 6y agoIs this referring to ENVs inside the Docker image or on the system running it as a whole?
- wadkar 6y agoAren’t they the same thing (sort of)? The ENV in Dockerfile (or .env if you’re doing docker-compose) will be available during the build as well as runtime.
- move-on-by 6y agoAlways use `--rm` flag to automatically remove containers when it exits could probably be another best practice.