In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to install docker-ce under Ubuntu". In daily operation, I believe many people have doubts about how to install docker-ce under Ubuntu. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to install docker-ce under Ubuntu". Next, please follow the editor to study!
Experimental environment
Operating system: Ubuntu 18.04.4 LTS
LAN IP: 192.168.3.22
Docker is an integral part of modern software development and DevOps continuous integration and deployment pipeline, and most companies use containerization technology to reduce server costs.
Install the necessary system resource library root@linuxcool:~# apt-get updateroot@linuxcool:~# apt-get-y install apt-transport-https ca-certificates curl software-properties-common install the GPG certificate root@linuxcool:~# curl-fsSL https://mirrors.nwafu.edu.cn/docker-ce/linux/ubuntu/gpg | apt-key add-
The Docker server is abroad, so it will be very slow to install docker using docker.io, and sometimes it will not be installed successfully due to the timeout. Therefore, I am using the domestic image acceleration of the Network and Educational Technology Center of Northwest University of Agriculture and Forestry Science and Technology, and there are many image acceleration sites in China, such as Aliyun, Tencent Cloud, NetEase, Tsinghua University and so on.
Update the system and install Docker-CEroot@linuxcool:~# apt-get-y updateroot@linuxcool:~# apt-get-y install docker-ce
The latest version of docker is installed through the above command. If you want to install docker, please continue to read the following
Find the version of Docker-CE
Apt-cache madison docker-cedocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.8room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.7room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.6room3-0~ubuntu-bionic | | | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.5room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5vir 19.03.4room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5Vera 19.03.3room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.2room3-| 0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.1room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 19.03.0room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 18.09.9room3-0~ubuntu-bionic | https://mirrors .aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/ 18.09.8room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5vir 18.09.7room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/ 18.09.6room3-0~ubuntu-bionic | Linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 18.09.5room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5VOR 18.09.4room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 18.09.3room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker- Ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 18.09.2room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu 18.09.1room3-0~ubuntu-bionic | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 5https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 18.06.3~ce~3-0~ubuntu | | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 18.06.2~ce~3-0~ubuntu | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 18.06.1~ce~3-0~ubuntu | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packagesdocker-ce | 18.06.0~ce~3-0~ubuntu | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable | Amd64 Packagesdocker-ce | 18.03.1~ce~3-0~ubuntu | https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic/stable amd64 Packages
Install a specified version of Docker-CE, such as 19.03.8room3-0~ubuntu-bionic
Root@linuxcool:~# apt-get-y install docker-ce=19.03.8~3-0~ubuntu-bionic installation check root@linuxcool:~# docker versionClient: Docker Engine-CommunityVersion: 19.03.8API version: 1.40Go version: go1.12.17Git commit: Wed Mar 11 01:25:46 2020OS/Arch: linux/amd64Experimental: falseServer: Docker Engine-CommunityEngine: Version: 19.03.8 API version: 1.40 (minimum version 1.12) Go version: go1.12.17 Git commit: afacb8b7f0 Built: Wed Mar 11 01:24:19 2020 OS/Arch: linux/amd64 Experimental: falsecontainerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dddocker-init: Version: 0.18.0 GitCommit: fec3683 configure image acceleration
Create a daemon.json profile
Root@linuxcool:~# vim / etc/docker/daemon.json {"registry-mirrors": ["https://dockerhub.mirrors.nwafu.edu.cn/"]}"
The default daemon.json file does not exist. If the daemon.json file does not exist, create it yourself
Load configuration Restart the docker service root@linuxcool:~# systemctl daemon-reloadroot@linuxcool:~# systemctl restart docker to verify whether the image acceleration configuration takes effect root@linuxcool:~# docker infoClient:Debug Mode: falseServer:Containers: 0 Running: 0 Paused: 0 Stopped: 0Images: 0Server Version: overlay2 Backing Filesystem: Supports d_type: true Native Overlay Diff: trueLogging Driver: json-fileCgroup Driver: cgroupfsPlugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk SyslogSwarm: inactiveRuntimes: runcDefault Runtime: runcInit Binary: docker-initcontainerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429runc version: dc9208a3303feef5b3839f4323d9beb36df0a9ddinit version: fec3683Security Options: apparmor seccomp Profile: defaultKernel Version: 5.3.0-51-genericOperating System: Ubuntu 18.04.4 LTSOSType: linuxArchitecture: x86_64CPUs: 8Total Memory: 15.64GiBName: linuxcoolID: K252:G32L:GWWN:J5FE:3MFZ:2ITG:UE7Y:Y26F:QT3Q:2PLS:HCUX:PJYZDocker Root Dir: / var/lib/dockerDebug Mode: falseRegistry: https://index.docker.io/v1/Labels:Experimental: falseInsecure Registries : 127.0.0.0/8Registry Mirrors: https://dockerhub.mirrors.nwafu.edu.cn/Live Restore Enabled: falseWARNING: No swap limit support
Registry Mirrors defaults to docker.io. If you see that Registry Mirrors changes to https://dockerhub.mirrors.nwafu.edu.cn, the configuration is already in effect.
Docker Service Management # self-starting Service root@linuxcool:~# systemctl enable docker.service# Service status root@linuxcool:~# systemctl status docker.service# start Service root@linuxcool:~# systemctl start docker.service# restart Service root@linuxcool:~# systemctl restart docker.service# stop Service root@linuxcool:~# systemctl stop docker.service pull Image root@linuxcool:~# docker pull centos:8.1.19118.1.1911: Pulling from library/centos8a29a15cefae: Pull completeDigest: sha256: Fe8d824220415eed5477b63addf40fb06c3b049404242b31982106ac204f6700Status: Downloaded newer image for centos:8.1.1911docker.io/library/centos:8.1.1911 so far The study on "how to install docker-ce under Ubuntu" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.