r/docker • u/D3ntrax • Mar 14 '21
Docker & Dockerfile Security Cheat Sheet
Bonus1: Do not forget to use distroless/static:nonroot images, if possible.
Bonus2: I did small search to check whether this opened before. And just found this post: What are your Dockerfile best practices? And which ones are harder to implement? by /u/capitangoloOWASP® Foundation creates some cool cheatsheet series.
287
Upvotes
3
u/lirantal Mar 15 '21
Some plug for my own work for some practical step-by-step tutorials for devs to follow:
2
1
13
u/uselessmlm Mar 14 '21 edited Mar 14 '21
Thanks, this is a great set of bookmarks for reference.
One question - I understand /var/run/docker.sock should never be exposed in a docker run or compose file. However, container management tools like Portainer need this to function.
So the only solution to this is to assume the additional risk and enable access?