DEV Community

Marko Anastasov
Marko Anastasov

Posted on

When Does It Make Sense to Use Docker?

Using Docker / containers makes sense only if you need to standardize deployment pipelines. Otherwise it’s a waste of time.

When do you need to standardize anything? When you're dealing with a a large quantity.

So, either you:

  1. Have many (as in, double digits) microservices comprising one system, or
  2. Are in a very large organization with many development teams.

So if you have one or two apps running on Heroku / Beanstalk — leave them there. You’re not missing out on anything. It's pure overhead.

Latest comments (27)

Collapse
 
andrewbaisden profile image
Andrew Baisden

All this talk got me more interested in finding use cases to add Docker to my workflow.

Collapse
 
qm3ster profile image
Mihail Malo

Easier to do clean updates/uninstalls for smaller services.
That's one of the reasons I use Docker on home automation SBCs.

Collapse
 
elmuerte profile image
Michiel Hendriks

Instead of wasting time to figure out why your local setup doesn't work you can waste time to figure out why your local docker setup doesn't work.

Collapse
 
ultrageoff profile image
ultrageoff

Created my account just so I could 'like' this :-)

Collapse
 
rmaurodev profile image
Ricardo

Hype :)

Collapse
 
atomzwieback profile image
Atomzwieback

I think it makes also sense to use docker in a small company because if youre building your own build with versions youre able to easy hotswap back your container to an old version if the new build has a problem.

Collapse
 
gauravumrani profile image
Gaurav

We have used Docker container for deployment, there were two reasons for that.

  1. We used LibreOffice to convert Docx to pdf via API, so in our application, we need LibreOffice to be installed also, we include the installation of LibreOffice in docker file, we also used puppeteer for generating pdf, for that we need headless chrome browser, that also is installed from docker file.

  2. We bought 1 server instance, we needed to deploy multiple apps on 1 server, so multiple apps were having the same env keys such as the SENTRY key for API and WebApp, so we deployed apps on multiple docker containers so API keys, etc do not cause any issues.

Collapse
 
markoa profile image
Marko Anastasov

Thanks for sharing.

This reminds me of my recent use case. We were building our latest book using Pandoc, and to install Pandoc + Latex the right way is such a pain in the ass, using a Docker image was 10x easier! :)

Collapse
 
shaunakde profile image
Shaunak De • Edited

Always.
~ Your team's dev-ops engineer. xxx :P

Collapse
 
gaxze profile image
Gary

I use docker for everything because I like the simplicity of spinning up containers. But it does come with it's own problems as others have stated.

Collapse
 
whitewcallum580 profile image
Callum White

I've recently used them for a much smaller project with only 5 node apps. I found that being able to literally clone the repo, run docker-compose build and docker-compose up was super easy and really helped when I needed to quickly get everything on a laptop and run it at different outdoor testing sites.

Collapse
 
markoa profile image
Marko Anastasov

Why specifically was it easier than using NVM & local npm installs?

Collapse
 
dominikbraun profile image
DB

It does not only make local development in a complex environment a lot simpler like the other comments said, but also exactly documents the requirements for an application to run. Dockerfiles are Infrastructure as Code, and instead of installing stuff around and feeling lucky, all dependencies, packages and steps for getting it up an running are versionable, reviewable and ultimately executable.