The process of installing Docker in Linux system

The process of installing Docker in Linux system

In this blog, I will walk you through the process of installing Docker in simple steps. Installing Docker is a piece of cake. You only need to run a few commands and you are done!

The Linux used in this article is Ubuntu, so let’s get started!

Step 1: To install docker on Ubuntu machine, first let us update the packages.

sudo apt-get update

Enter password:

Step 2: Now before installing docker, I need to install the recommended packages:

sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

Press 'y' to continue:

After this, we are done with the prerequisites!

Now, let’s move on to installing Docker.

Step 3: Enter the following command to install the docker engine:

sudo apt-get install docker-engine

Sometimes it will ask for password again, press enter and the installation will start.

By doing this, your task of installing Docker is complete!

Step 4: Start the docker service:

sudo service docker start

It says your job is already running and docker has been installed successfully.

Step 5: Now just to verify if docker is running successfully, let me show you how to pull the CentOS image from docker hub and run the CentOS container, to do this, just type the following command:

sudo docker pull centos

First, it will check the local registry for the CentOS image. If it is not found there, then it will go to docker hub and pull the image:

In this way, we have successfully pulled a centOS image from the docker hub and run the CentOS container:

sudo docker run -it centos

As you can see in the screenshot above, we are now inside the CentOS container!

This is the end of this article on how to install Docker in Linux. For more information about installing Docker in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Install Docker environment in Linux environment (no pitfalls)
  • Docker installation and deployment example on Linux
  • Steps to install MySQL using Docker under Linux
  • Golang study notes: Install Go1.15 version (win/linux/macos/docker installation)
  • Detailed explanation of how to install mongodb using docker on linux

<<:  Use render function to encapsulate highly scalable components

>>:  CSS3 realizes the red envelope shaking effect

Recommend

How to use mysql index merge

Index merging is an intelligent algorithm provide...

How to use Portainer to build a visual interface for Docker

Portainer Introduction Portainer is a graphical m...

The use of FrameLayout in six layouts

Preface In the last issue, we explained LinearLay...

Teach you how to use docker-maven-plugin to automate deployment

1. Introduction to docker-maven-plugin In our con...

Solution to the problem of eight hours difference in MySQL insertion time

Solve the problem of eight hours time difference ...

Detailed example code of mysql batch insert loop

background A few days ago, when I was doing pagin...

js canvas realizes slider verification

This article example shares the specific code of ...

MySQL 8.0.18 stable version released! Hash Join is here as expected

MySQL 8.0.18 stable version (GA) was officially r...

HTML implementation of a simple calculator with detailed ideas

Copy code The code is as follows: <!DOCTYPE ht...

Tutorial on installing PHP on centos via yum

First, let me introduce how to install PHP on Cen...

Summary of common problems and solutions in Vue (recommended)

There are some issues that are not limited to Vue...

vue-cropper component realizes image cutting and uploading

This article shares the specific code of the vue-...

JavaScript typing game

This article shares the specific code of JavaScri...