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

Introduction to MySQL statement comments

MySQL supports three types of comments: 1. From t...

Vue+Bootstrap realizes a simple student management system

I used vue and bootstrap to make a relatively sim...

Detailed explanation of Apache website service configuration based on Linux

As an open source software, Apache is one of the ...

HTML+CSS project development experience summary (recommended)

I haven’t updated my blog for several days. I jus...

Detailed explanation of the correct way to install opencv on ubuntu

This article describes how to install opencv with...

Nodejs converts JSON string into JSON object error solution

How to convert a JSON string into a JSON object? ...

JavaScript - Using slots in Vue: slot

Table of contents Using slots in Vue: slot Scoped...

Summary of seven MySQL JOIN types

Before we begin, we create two tables to demonstr...

Tutorial on installing php5, uninstalling php, and installing php7 on centos

First, install PHP5 very simple yum install php T...

Docker image access to local elasticsearch port operation

Using the image service deployed by docker stack,...

About the pitfalls of implementing specified encoding in MySQL

Written in front Environment: MySQL 5.7+, MySQL d...

How to implement Vue binding class and binding inline style

Table of contents Binding Class Binding inline st...

7 Ways to Write a Vue v-for Loop

Table of contents 1. Always use key in v-for loop...