centos7.9
系统环境
[root@centos7 ~]#uname -a
Linux centos7 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@centos7 ~]#cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
安装的docker版本
[root@centos7 ~]#docker version
Client: Docker Engine - Community
Version: 19.03.15
API version: 1.40
Go version: go1.13.15
Git commit: 99e3ed8
Built: Sat Jan 30 03:11:43 2021
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.15
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 99e3ed8
Built: Sat Jan 30 03:18:13 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.9
GitCommit: ea765aba0d05254012b0b9e595e995c09186427f
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
编译安装之后启动报错
[root@centos7 ~]#systemctl start docker
A dependency job for docker.service failed. See 'journalctl -xe' for details.
[root@centos7 ~]#journalctl -xe
-- Unit network.service has finished starting up.
--
-- The start-up result is done.
Mar 11 04:53:20 centos7.kktb.org sshd[2431]: Accepted password for root from 10.0.0.1 port 50500 ssh2
Mar 11 04:53:20 centos7.kktb.org systemd-logind[621]: New session 7 of user root.
-- Subject: A new session 7 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 7 has been created for the user root.
--
-- The leading process of the session is 2431.
Mar 11 04:53:20 centos7.kktb.org systemd[1]: Started Session 7 of user root.
-- Subject: Unit session-7.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-7.scope has finished starting up.
--
-- The start-up result is done.
Mar 11 04:53:20 centos7.kktb.org sshd[2431]: pam_unix(sshd:session): session opened for user root by (uid=0)
Mar 11 04:53:36 centos7.kktb.org polkitd[620]: Registered Authentication Agent for unix-process:2479:798706 (system bus name :1.65 [/usr/bin/pkttyagen
Mar 11 04:53:36 centos7.kktb.org systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
Mar 11 04:53:36 centos7.kktb.org systemd[2485]: Failed to chown socket at step GROUP: No such process
Mar 11 04:53:36 centos7.kktb.org systemd[1]: docker.socket control process exited, code=exited status=216
Mar 11 04:53:36 centos7.kktb.org systemd[1]: Failed to listen on Docker Socket for the API.
-- Subject: Unit docker.socket has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has failed.
--
-- The result is failed.
Mar 11 04:53:36 centos7.kktb.org systemd[1]: Dependency failed for Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is dependency.
Mar 11 04:53:36 centos7.kktb.org systemd[1]: Job docker.service/start failed with result 'dependency'.
Mar 11 04:53:36 centos7.kktb.org systemd[1]: Unit docker.socket entered failed state.
Mar 11 04:53:36 centos7.kktb.org polkitd[620]: Unregistered Authentication Agent for unix-process:2479:798706 (system bus name :1.65, object path /org
创建docker组之后,重新启动即可
[root@centos7 ~]#groupadd docker
#启动成功
[root@centos7 ~]#systemctl start docker
[root@centos7 ~]#systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-03-11 04:54:07 GMT; 2min 59s ago
Docs: https://docs.docker.com
Main PID: 2501 (dockerd)
Tasks: 16
Memory: 22.0M
CGroup: /system.slice/docker.service
└─2501 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.142203305Z" level=info msg="scheme \"unix\" not registered, fallb...ule=grpc
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.142216021Z" level=info msg="ccResolverWrapper: sending update to ...ule=grpc
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.142222107Z" level=info msg="ClientConn switching balancer to \"pi...ule=grpc
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.170101868Z" level=info msg="Loading containers: start."
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.289087193Z" level=info msg="Default bridge (docker0) is assigned ...address"
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.322452616Z" level=info msg="Loading containers: done."
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.349804031Z" level=info msg="Docker daemon" commit=99e3ed8 graphdr...19.03.15
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.349871612Z" level=info msg="Daemon has completed initialization"
Mar 11 04:54:07 centos7.kktb.org dockerd[2501]: time="2022-03-11T04:54:07.363256443Z" level=info msg="API listen on /var/run/docker.sock"
Mar 11 04:54:07 centos7.kktb.org systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
配置docker镜像加速器 这里使用阿里云的镜像加速器,登录阿里云的账号之后,会生成独有的docker加速链接 登录阿里云镜像控制台cr.console.aliyun.com 点击镜像工具—>镜像加速器, 验证
[root@centos7 ~]#docker info
Client:
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
scan: Docker Scan (Docker Inc., v0.12.0)
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 1
Server Version: 19.03.15
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
init version: fec3683
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: 16
Total Memory: 7.62GiB
Name: centos7
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
Registry Mirrors:
https://ixxxxxxx.mirror.aliyuncs.com/ #此处多了一个registry mirrors地址,指定的就是阿里云的docker镜像地址
Live Restore Enabled: false
Product License: Community Engine
|