OneBite.Dev - Coding blog in a bite size

install docker on linux

Simple docker step by step how to install docker on linux with explanation

Here’s a quick and easy guide to installing Docker on a Linux operating system.

Learning to Install Docker on Linux

Docker is a fantastic tool that simplifies the process of managing applications within isolated containers, enhancing software development and deployment.

Step 1: Update the Existing List of Packages

Start the installation process by ensuring that the existing list of packages is up-to-date. This can be done using the command $sudo apt-get update.

Step 2: Install Required Packages for Docker

To secure the HTTPS connection to Docker’s server, some packages are required. Fetch them using this command: $sudo apt-get install apt-transport-https ca-certificates curl software-properties-common.

Step 3: Add Docker’s GPG Key

After successfully installing the necessary packages, Docker’s GPG key should be added for a secure connection with Docker. Use the command curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -.

Step 4: Install Docker

At this stage, the Docker repository can be added to the APT sources and an update can be run using this command: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable". Then update with sudo apt-get update.

Now, Docker can be installed using the command sudo apt-get install docker-ce.

Step 5: Verify Docker Installation

The last step is to verify that Docker has been successfully installed on the Linux machine. Use this command to see if Docker’s running: $sudo systemctl status docker.

That’s it! Docker is now installed on your Linux system and is ready for use. Happy Dockerizing!

docker