23rd Jul, 2021
5 min read
A quick rundown guide without the lingo and frills
Docker. It’s a little blue whale with a container sitting on its back. We hear
about it from various places but it’s usually just left to the DevOps guy to
Or perhaps you’ve tried to pick
Docker. It’s a little blue whale with a container sitting on its back. We hear about it from various places but it’s usually just left to the DevOps guy to deal with.
Or perhaps you’ve tried to pick it up out of curiosity. So you start with Google and the amount of information returned just feels overwhelming. In this piece, we’re going to go over what Docker is, how it works, and the differences between a Docker container and a virtual machine.
Docker is a development platform and a virtualization technology that makes it easy for us to develop and deploy apps inside neatly packaged virtual containerized environments.
What does all this mean?
There are two parts to Docker — the Docker image and the Docker container.
The Docker image is the file used to execute code in a Docker container. A Docker container is the virtualized runtime environment. You can think of a container as the thing that runs the image.
This means that apps run the same, no matter where they are or what machine they’re running on. A docker container — or the virtualized runtime environment — creates a little ring-fenced sandbox that makes sure that the environment and settings are the same everywhere.
DockerHub is an online repository of Docker containers with pre-configured environments for a specific programming language or setup to get started. It’s like where all the boilerplates for systems configuration live.
That’s basically it. You can download any of these Docker images for free and configure them to run your apps the way you need them to. Once that’s done, you can ship your image to other machines and replicate your environment without the hassle of trying to make it work.
To pull a docker image from DockerHub, you can just use the pull command. For example:
docker pull ubuntu
You can add tags to the end of your image pull to get a specific version. If no tags are present, you will get the latest version available.
Docker is a form of virtualization — but it isn’t a virtual machine.
In a virtual machine (VM), it has to quarantine off a set amount of resources, hard disk space, memory, and processing power. It needs to emulate hardware, and boot up an entire operating system.
Then the VM needs to communicate with the host computer via a translator application running on the Host Operating System called a “Hypervisor”.
Here’s a diagram:
In contrast, Docker communicates natively with the system kernel, bypassing the middleman on Linux machines, Windows 10, and Windows Server 2016 and above. It uses less disk space and you only need a single copy of files needed and share them between containers.
You start with a Dockerfile (yes, there are no spaces, this is not a typo), which can be built into a Docker image. You then run this image on your Docker container.
A Dockerfile is a simple text document that instructs how the Docker image will be built. It’s like the blueprint of all the things you need. Think of it like the packages.json file equivalent — but Docker.
Things you’ll need for a Dockerfile are:
Once your Dockerfile is complete, you can build it to form the Docker image. The command looks something like this:
docker build -t [dockerImageNameYouWantHere] [location of dockerfile here]
To check that everything went as planned, you can verify it with the following command:
Now your built image can run a container of that image or push it to the cloud to share with others.
To run a container, it’s just a simple run command, followed by the image name.
docker run imageNameHere
I didn’t really go over how to set up Docker and how to use it. In part, it’s because it’s out of scope for this piece. I wanted to keep it as a simple introduction for complete newbies to get the general gist of what Docker is and how it works.
However, if you want to explore further, here are some helpful resources that can help you on your way to becoming a Docker pro.
And that’s basically it for this piece. I hope you’ve found it useful and thank you for reading. 😊
Because who doesn’t want to work more efficiently?
For software developers and engineers, the number of hours worked doesn’t always correlate to productivity. Instead, it can point to inefficiencies — or being stuck on a bug for an unnecessarily long time.
The ability to code quickly and efficiently can
Or pay a fraction of the price if you want to certificate
Let’s get real — University education can get expensive. Or perhaps you’re contemplating switching careers but don’t want to spend 3 years back in school. You don’t need a degree to get into programming. The
We’ve all used git in some form or another. The code versioning system is an
industry staple. With over 40 million users worldwide and 190 million
repositories on GitHub, git is here to stay.
While the concept of git is easy - pull your code, do whatever, save, add,
We’ve all done it — deleted a file we shouldn’t have, merged things that aren’t
supposed to be on the main branch, accidentally pushed up sensitive information,
committing to the wrong branch…
GIT is fantastic when things go as planned — but not so much when it comes to