Docker  Defined

Docker Defined

Play this article

Docker is a fix to a problem that plagues all developers. It works on my machine.

We've all said those words before, and our project manager has responded like the meme. Docker solves that for us.

Docker is what is known as a Container Runtime, a software component that can run a container. A container is a lightweight package that has everything you need to run an application.

Since we know what these 2 things are, we can conclude that a docker container allows us to package our app, exactly the way it is on our machine, and ship it to either our testers or users exactly the same. It's essentially shipping your machine.

For example, my app has a Next.js frontend and PHP backend. I'm using Next.js 13.5 and PHP 8.1. If you just cloned it directly from Github or any other repo, you might have issues running it on your device. You might have PHP 7.5 installed which will result in it probably not working on your machine.

With Docker, you can get the docker image and set it up with the same dependencies as mine. Exactly the same. Which saves everyone a lot of trouble and explaining to do.

A coomon use case for this would be if you had a team of devs all working on the same project. Everyone needs to be on the same page or else.

Getting started with Docker is pretty simple. And the best part is it runs on all the major operating systems. Now there's always a bit of extra config to do afterwards, I'm not going to claim it's all sunshine and rainbows. But it's waaaaaaaay better than each person doing their won thing and hoping it all works after shipping.