老系统装的docker发现很多镜像已经不再支持,查网上需要装docker-ce,卸载docker,添加源:https://download.docker.com/linux/centos/docker-ce.repo。安装docker-ce最后启动docker报异常:
journalctl -xe
-- The start-up result is done.
Dec 08 17:30:01 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: Starting Session 2097629 of user root.
-- Subject: Unit session-2097629.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-2097629.scope has begun starting up.
Dec 08 17:30:01 iZbp1j6nqn3qz7t3ojr1ccZ CROND[6511]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Dec 08 17:30:13 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: Invalid user ftpadmin from 47.96.36.95 port 39610
Dec 08 17:30:13 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: input_userauth_request: invalid user ftpadmin [preauth]
Dec 08 17:30:13 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: pam_unix(sshd:auth): check pass; user unknown
Dec 08 17:30:13 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=47.96.36.95
Dec 08 17:30:15 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: Failed password for invalid user ftpadmin from 47.96.36.95 port 39610 ssh2
Dec 08 17:30:15 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: Received disconnect from 47.96.36.95 port 39610:11: Bye Bye [preauth]
Dec 08 17:30:15 iZbp1j6nqn3qz7t3ojr1ccZ sshd[6516]: Disconnected from 47.96.36.95 port 39610 [preauth]
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ polkitd[502]: Registered Authentication Agent for unix-process:6549:6800316710 (system bus name :1.4195603 [/usr/bin/pkttyagent --notify-fd 5 --fallback],
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ dockerd[6555]: time="2023-12-08T17:31:08.763547319+08:00" level=info msg="Starting up"
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ dockerd[6555]: time="2023-12-08T17:31:08.798534673+08:00" level=error msg="[graphdriver] /var/lib/docker contains several valid graphdrivers: overlay2, de
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ dockerd[6555]: failed to start daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, devicemapper; cleanu
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: Failed to start 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 failed.
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: Unit docker.service entered failed state.
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: docker.service failed.
Dec 08 17:31:08 iZbp1j6nqn3qz7t3ojr1ccZ polkitd[502]: Unregistered Authentication Agent for unix-process:6549:6800316710 (system bus name :1.4195603, object path /org/freedesktop/PolicyKit1/Auth
Dec 08 17:31:11 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: docker.service holdoff time over, scheduling restart.
Dec 08 17:31:11 iZbp1j6nqn3qz7t3ojr1ccZ systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
最后看到这个贴:https://zhuanlan.zhihu.com/p/660028084。
rm -rf /var/lib/docker/*
systemctl start docker
终于能启动了