Install Docker on ubuntu18.04

image.png

Docker

Three core concepts of Docker: image, container, warehouse

**Image: Similar to the image of a virtual machine, it is an installation file in the common saying. ****Container: Similar to a lightweight sandbox, a container creates an application running instance from an image, which can be started, started, stopped, and deleted, and these containers are isolated from each other and invisible to each other. **** Warehouse: Similar to a code warehouse, it is a place where Docker centrally stores image files. **

Start installing Docker

Before installing Docker Engine-Community on the new host for the first time, you need to set up the Docker repository.

Set up warehouse

$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
 apt-transport-https \
 ca-certificates \
 curl \
 gnupg-agent \
 software-properties-common

Add Docker's official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88

image.png

Set up the warehouse:

$ sudo add-apt-repository \
 " deb [arch=amd64] https://download.docker.com/linux/ubuntu \
 $(lsb_release -cs) \
 stable"

image.png

Install Docker Engine-Community

After setting up the warehouse, you can install Docker Engine-Community

$ sudo apt-get update`
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

It will take a while, wait patiently.

test##

After the installation is complete, verify whether the installation is successful:

$ sudo docker run hello-world

image.png

Installation method using script (not verified)

There is a simpler installation method is to use the script provided by the official website:

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

If you want to use Docker as a non-root user, you should consider adding users to the docker group in a way similar to the following:

$ sudo usermod -aG docker your-user

reference##

Ubuntu Docker installation[Install Docker on linux (very simple Installation method)) (https://links.jianshu.com/go?to=https%3A%2F%2Fblog.csdn.net%2Fqq_41723615%2Farticle%2Fdetails%2F93386194)

Recommended Posts

Install docker on Ubuntu
Install Docker on ubuntu18.04
Install Docker on Ubuntu18
Docker practice (1): install Docker on Ubuntu 16.04
Install Docker on Ubuntu 18.04 offline
ubuntu18.04 install docker
docker install ubuntu
Docker ubuntu: install python-PIL-image environment on 14.04
install vscode on ubuntu18
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install nodejs10 on Ubuntu16
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
Install Python3 on Ubuntu 14.04
Install rJava on Ubuntu18
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
Install KDE on Ubuntu16.04.2
install Docker on centos6.5
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
How to install Docker Compose on Ubuntu 18.04
Install docker on ubuntu and basic usage
How to install Prometheus with Docker on Ubuntu 14.04
Install ubuntu on virtual machine
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Install QQ robot on Ubuntu 16.04
Install Python 3.7 on Ubuntu 18.04 LTS
Install Android Studio on Ubuntu
How to install and use Docker on Ubuntu 20.04
Install scrapy framework on ubuntu
Install docker transfer on Centos7
Install Mysql offline on Ubuntu
Install Oracle Java8 on Ubuntu
Install docker on Centos system
Install Odoo 11 stack on Ubuntu 16.04
Install Go locale on Ubuntu16
Install common software on Ubuntu 16.04
Install non-portable QQ on ubuntu
How to install and use Docker on Ubuntu 16.04
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install MySQL on Ubuntu 20.04
Install and configure MySQL on Ubuntu
Install Chef server workstation on Ubuntu 18.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
Install botan2 encryption library on ubuntu
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04