赞
踩
1.清楚系统残余项
命令:
- sudo yum remove docker \
- docker-client \
- docker-client-latest \
- docker-common \
- docker-latest \
- docker-latest-logrotate \
- docker-logrotate \
- docker-selinux \
- docker-engine-selinux \
- docker-engine
执行结果
2.安装下载Docker依赖的工具
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
执行结果:
以后每个软件都优先从阿里云的软件库中下载,如果阿里云仓库没有,会去docker.hub中下载。(与maven仓库同理)
3.更新yum缓存(为了保证能更新和下载需要的服务:如dock
sudo yum makecache
执行结果:
sudo yum -y install docker-ce
执行结果:
看到完毕就代表安装成功了
sudo systemctl start docker
以上我们已经将Docker安装好了,接下来测试下Docker是否可以顺利启动:
docker info
执行结果:
-
- Client:
- Context: default
- Debug Mode: false
- Plugins:
- app: Docker App (Docker Inc., v0.9.1-beta3)
- buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
- scan: Docker Scan (Docker Inc., v0.23.0)
-
- Server:
- Containers: 0
- Running: 0
- Paused: 0
- Stopped: 0
- Images: 0
- Server Version: 20.10.22
- Storage Driver: overlay2
- Backing Filesystem: xfs
- Supports d_type: true
- Native Overlay Diff: true
- userxattr: false
- Logging Driver: json-file
- Cgroup Driver: cgroupfs
- Cgroup Version: 1
- 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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
- Default Runtime: runc
- Init Binary: docker-init
- containerd version: 78f51771157abb6c9ed224c22013cdf09962315d
- runc version: v1.1.4-0-g5fd4c4d
- init version: de40ad0
- Security Options:
- seccomp
- Profile: default
- Kernel Version: 3.10.0-1160.el7.x86_64
- Operating System: CentOS Linux 7 (Core)
- OSType: linux
- Architecture: x86_64
- CPUs: 4
- Total Memory: 1.777GiB
- Name: 192.168.73.128
- ID: U6HV:4B5S:FJ7Q:3O3K:ECJT:GDCZ:4OZF:K3JN:FAVX:TONC:YWOY:5XKV
- 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
sudo systemctl enable docker
到这一步dokcer的安装已经全部完成了
命令:
docker -v
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。