Install Docker CE image on Ubuntu 14.04/16.04

Original article Aliyun official address: docker-ce image-docker-ce download address-docker-ce installation tutorial-Alibaba Open Source Mirror Station Alibaba Open Source Mirror Station provides you with free docker-ce download address and docker-ce installation tutorial , docker-ce mirror introduction: docker ce Alibaba open source mirror site https://developer.aliyun.com/mirror/docker-ce

configuration method

Ubuntu 14.04/16.04 (install using apt-get)

Step 1: Install some necessary system tools

sudo apt-get update

sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

Step Two: Install the GPG Certificate

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

Step 3: Write software source information

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

Step 4: Update and install Docker-CE

sudo apt-get -y update
sudo apt-get -y install docker-ce

If you need to install the specified version of Docker-CE

Step 1: Find the version of Docker-CE

apt-cache madison docker-ce

Step 2: Install the specified version of Docker-CE (VERSION represents the version number)

sudo apt-get -y install docker-ce=[VERSION]

Installation verification

[root@i-ottdbx1b ~]# docker version
Client: Docker Engine - Community
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:45:41 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:44:05 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Start the docker service

service docker start

docker common commands

Order illustrate
docker images List mirrors on localhost
docker images -a List all local images (including intermediate image layers)
docker search redis Query the image of redis
docker pull redis Download the latest image of redis
docker rmi  redis delete redis image
docker ps List all currently running containers
docker ps -l Show recently created containers
docker ps -a List all currently running containers and historical running containers

Guess you like

Origin blog.csdn.net/qq_41322460/article/details/122189658