How to setup Docker on Linux
Setting up Docker on a linux machine is pretty easy and can be done in less than 10 minutes. Read on to find out how.
What is Docker?
Docker is an open-source platform that enables developers to automate the deployment, scaling, and management of applications using containerization. Introduced by Solomon Hykes in 2013 under the company DotCloud (later renamed Docker, Inc.), Docker revolutionized software development by providing a standardized unit of software called a container. Containers encapsulate an application and its dependencies, ensuring consistent operation across different environments. In this Blog post, we will take a look at how we can setup Docker ourselves on a linux machine.
Motivation behind Docker
The motivation behind Docker's creation stemmed from the need to address the challenges associated with traditional virtual machines (VMs) and application deployment. Traditional VMs, while providing isolation and resource management, were often resource-intensive and slow to start. Docker containers, on the other hand, are lightweight, start almost instantly, and share the host system's kernel, making them more efficient in terms of both resource utilization and performance.
Docker's introduction has significantly streamlined the development workflow, enabling developers to build, ship, and run applications with unprecedented ease and reliability. By decoupling applications from the underlying infrastructure, Docker facilitates seamless collaboration among development teams, enhances scalability, and supports a microservices architecture, fostering more agile and resilient software development practices.
While containerization was nothing new, but Docker introduced the standardization in container technology. Before that, many other different tools existed which all had their own pros and cons.
Install using the apt repository
- To setup Docker on linux machine, we need to set up the Docker repository.
- Install the Docker engine and docker-compose packages.
That is it. We can check whether docker is running or not, by using
sudo systemctl status docker
If you like this blog post, you can subscribe for Free also, to stay up to date and receive emails when new content is published!
As next, you can learn how to self-host Portainer instance yourself.