centos8 安裝原生docker


 

  近期,學習docker的用法,想在實際機器上練習一下,於是安裝了centos最新版本(centos8),結果發現在centos8上必須使用podman進行容器操作,於是我的本意是學習原生docker用法,所以,就刪除了podman,然后安裝原生docker支持。本文記錄一下操作步驟,以備今后參考。

  第一步、刪除系統自帶的podman相關的軟件包。

                    rpm -e podman*

      第二步、重啟系統

                    init 6

      第三步、參考網友安裝步驟,https://www.cnblogs.com/ding2016/p/11592999.html  感謝網友分享。按照下面的步驟實測可以正常安裝docker.

1. 下載docker-ce的repo

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

2. 安裝依賴(這是相比centos7的關鍵步驟)

yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

3. 安裝docker-ce

yum install docker-ce

4. 啟動docker

systemctl start docker

 

     第四步、查看docker Info信息

     

[zhou@localhost ~]$ sudo systemctl start docker
[zhou@localhost ~]$ sudo docker info
Client:
Debug Mode: false

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.5
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.18.0-147.3.1.el8_1.x86_64
Operating System: CentOS Linux 8 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.787GiB
Name: localhost.localdomain
ID: VRF5:EY5I:52P2:PSJD:UALD:X2UO:XT3Y:N625:IEA4:VVHG:4U4X:NG3A
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

 

第五步、查看docker 守護進程的版本

[zhou@localhost ~]$ sudo docker version
Client: Docker Engine - Community
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:25:41 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.12)
Go version: go1.12.12
Git commit: 633a0ea
Built: Wed Nov 13 07:24:18 2019
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.6
GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc:
Version: 1.0.0-rc8
GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f
docker-init:
Version: 0.18.0
GitCommit: fec3683
[zhou@localhost ~]$

                    


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM