If you are familiar with web/software development, chances are that you have heard about Docker and containers.
Judging from the perspective of someone who is unfamiliar with DevOps and a whole, this can be pretty confusing (at first).
This article explains the terms involved with containerization (another word you might have come across), docker, containers and how to work with them.
Docker, according to its official definition is a set of Platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.
This might sound even the more confusing, so think of docker as a platform to developers use to package applications with all the dependencies and external requirements it needs to run smoothly.
Docker makes it super easy for developers to quickly create ready-to-run containerized applications so that in the long run, it makes managing and deploying applications much easier.
What are Containers?
A container is a tool that allows developers to package an application with all the parts it needs, for example, libraries, dependencies, etc and then enable it to be shipped out as a single package
The Docker Daemon is a toolbox that runs on your host OS. Docker Daemon currently runs only on Linux because of its dependency on a large number of the Linux kernel.
Why and When should you use Docker?
Let’s say, for example, you want to build a social networking application with features like Facebook, or something as large scale as Uber.
To deploy your application, you need to host it on something known as a server, which in earlier times used to be a computer set up and configured to be a dedicated web hosting provider.
In modern times, you could easily use a service like Godaddy, etc who provide environments to host your application on their own machines.
Most of these servers operate on virtual Machines or Virtual Operating Systems eg macOS, Windows, etc.
Docker itself operates similar to a virtual machine with the significant difference that instead of creating an entire virtual operation system, it allows your application to use the same Linux kernel with the system your application is running on.
It only requires your application to be shipped with things that aren’t already available on the host computer.
In essence, using containerization platforms like Docker help reduce the size of applications and provide a massive boost to the performance of applications because applications are much faster and lighter.
To use docker, you first need to install the docker client on your computer, to do this on a computer running a Linux operating system such as ubuntu, run:
sudo snap install docker
To set up Docker on Windows or macOS, you need to first install the Docker Desktop client.
Once installed, you can open up a terminal shell and run
docker --help to see a list of example commands available for you.
As a first time user, of docker, you would also need to login to your docker-hub account (docker-hub is like a Github for sharing docker images), if you haven’t.. to do this, run the
docker login command and you’ll be prompted to sign in (you’ll need to create an account if you don’t have one), once authenticated, you’ll be redirected to the program to continue what you planned to do.
The official documentation provides various use cases of containerizing an application using docker.
Conclusion on Docker:
If you enjoyed this article please share on your social platforms, also feel free to leave a comment if you have any questions, edits or suggestions regarding this introduction to Docker.