15 Best Practices when working with Docker

Ali Zeynalli
3 min readDec 24, 2022
Photo by Ian Taylor on Unsplash

Docker is by far one of the most popular tools in DevOps world. If you work with containers, you will most probably have to deal with docker. This blog is not about fundamentals of Docker, but mainly for those who already work with Docker and would like to make his/her Docker activities more effective and performant. If you would like to get some information about Foundations of DevOps, popular tool stack and so on, check my other blog, given below:

Guide to DevOps Foundations with Must-Read Books and Popular Tools

Based on my personal experience and some research, I tried to gather some important tips and hints when working with Docker:

  1. Work In Progress should not be kept in unnamed, stopped containers — keep in mind that unnamed containers are potential victims to be deleted when memory is issue. So try to keep your undone work not in this kind of vulnerable containers.
  2. Clean-up your images regularly — images can build up quickly if you forget to clean them up costing big memory. Although Docker is memory friendly (common parts from containers won’t be duplicated), redundant images can cause extra space.
  3. Fetch dependencies that you trust — don’t fetch any unstable or unpopular dependencies that you don’t trust the owner. If that dependency is removed or changed, it…



Ali Zeynalli

IT-Architect | BMW Group | M.Sc. Technical University of Berlin