安装新版本docker的时候,发现启动不起来,因为以前使用这个镜像的时候直接启动了,也没有遇到过。也就谷歌了一下,发现是配置问题,因为以前没有遇到过,这里就记录一下,
[root@www.wulaoer.org ~]# systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since 一 2023-04-10 21:25:43 CST; 5s ago Docs: http://docs.docker.com Process: 15465 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE) Main PID: 15465 (code=exited, status=1/FAILURE) 4月 10 21:25:41 swarm systemd[1]: Starting Docker Application Container En..... 4月 10 21:25:41 swarm dockerd-current[15465]: time="2023-04-10T21:25:41.847..." 4月 10 21:25:41 swarm dockerd-current[15465]: time="2023-04-10T21:25:41.850..." 4月 10 21:25:42 swarm dockerd-current[15465]: time="2023-04-10T21:25:42.8604... 4月 10 21:25:43 swarm dockerd-current[15465]: Error starting daemon: SELinu...) 4月 10 21:25:43 swarm systemd[1]: docker.service: main process exited, cod...RE 4月 10 21:25:43 swarm systemd[1]: Failed to start Docker Application Conta...e. 4月 10 21:25:43 swarm systemd[1]: Unit docker.service entered failed state. 4月 10 21:25:43 swarm systemd[1]: docker.service failed. Hint: Some lines were ellipsized, use -l to show in full.
虽然我是yum安装的docker,但是我的docker版本特别的旧,所以需要修改docker的配置文件。
[root@www.wulaoer.org ~]# vim /etc/sysconfig/docker # /etc/sysconfig/docker # Modify these options if you want to change the way the docker daemon runs #OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false' DNS='--selinux-enabled --log-driver=journald --signature-verification=false' if [ -z "${DOCKER_CERT_PATH}" ]; then DOCKER_CERT_PATH=/etc/docker fi
然后启动问题解决,
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏