日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Docker 安装 For CentOS 7.4

發(fā)布時(shí)間:2024/8/26 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Docker 安装 For CentOS 7.4 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

安裝前提條件:

CentOS 版本 7.x,本例中使用CentOS 7.4

?

1.安裝yum-utils (yum-utils提供yum-config-manager工具包等)

# yum install -y yum-utils \device-mapper-persistent-data \lvm2

  

2.添加docker yum源

# yum-config-manager \--add-repo \https://download.docker.com/linux/centos/docker-ce.repo

  

3.列出歷史可安裝版本的docker

[root@test yum.repos.d]# yum list docker-ce --showduplicates | sort -r* updates: mirrors.tuna.tsinghua.edu.cn Loaded plugins: fastestmirror Installed Packages* extras: mirrors.tuna.tsinghua.edu.cn* epel: mirrors.tuna.tsinghua.edu.cn docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos @docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable Determining fastest mirrors* base: mirrors.tuna.tsinghua.edu.cn Available Packages

?

4.安裝指定版本的docker

[root@test yum.repos.d]# yum install docker-ce-17.09.0.ce-1.el7.centos

 

5.啟動(dòng)docker服務(wù)

#systemctl start docker #systemctl status docker --查看docker運(yùn)行狀態(tài)● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)Active: active (running) since Thu 2018-04-12 14:40:25 CST; 3 weeks 0 days agoDocs: https://docs.docker.comMain PID: 879 (dockerd)Memory: 28.7MCGroup: /system.slice/docker.service├─879 /usr/bin/dockerd└─967 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker...Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.772795499+08:00" level=info msg="[graphdriver] using prior storage driver: overlay" Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.985105572+08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds" Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.989165246+08:00" level=info msg="Loading containers: start." Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.635272236+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can ...red IP address" Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.688855850+08:00" level=info msg="Loading containers: done." Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.792474284+08:00" level=info msg="Docker daemon" commit=afdb6d4 graphdriver(s)=overlay version=17.09.0-ce Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.807625596+08:00" level=info msg="Daemon has completed initialization" Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.859396502+08:00" level=info msg="API listen on /var/run/docker.sock" Apr 12 14:40:25 test systemd[1]: Started Docker Application Container Engine. Apr 23 10:23:25 test dockerd[879]: time="2018-04-23T10:23:25.951186829+08:00" level=error msg="Error setting up exec command in container tomcat_01: Container b165437998d2ac8ff3c7246b10f417...is not running" Hint: Some lines were ellipsized, use -l to show in full.

?

6.docker數(shù)據(jù)默認(rèn)存儲(chǔ)路徑在/var/lib/docker

?

7.設(shè)置docker服務(wù)開(kāi)機(jī)啟動(dòng)

#systemctl enable docker

?

轉(zhuǎn)載于:https://www.cnblogs.com/dinglin1/p/8989324.html

總結(jié)

以上是生活随笔為你收集整理的Docker 安装 For CentOS 7.4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。