docker遇到的问题

root@localhost ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-01-03 06:19:42 EST; 25s ago
     Docs: http://docs.docker.com
  Process: 3151 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=dock
er-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/dock
er/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $B
LOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
 Main PID: 3151 (code=exited, status=1/FAILURE)

Jan 03 06:19:40 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Jan 03 06:19:40 localhost.localdomain dockerd-current[3151]: time="2019-01-03T06:19:40.054081565-05:00" level=warning msg="could no...ound"
Jan 03 06:19:40 localhost.localdomain dockerd-current[3151]: time="2019-01-03T06:19:40.068262053-05:00" level=info msg="libcontaine...3155"
Jan 03 06:19:41 localhost.localdomain dockerd-current[3151]: time="2019-01-03T06:19:41.086061892-05:00" level=warning msg="overlay2: the...
Jan 03 06:19:42 localhost.localdomain dockerd-current[3151]: Error starting daemon: SELinux is not supported with the overlay2 grap...alse)
Jan 03 06:19:42 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jan 03 06:19:42 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Jan 03 06:19:42 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Jan 03 06:19:42 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

根据网上的方法操作了这个

[root@localhost ~]# /etc/sysconfig/docker
-bash: /etc/sysconfig/docker: Permission denied

出现了这个权限问题,但是我没有直接去解决

而是直接用了这个博主的方法https://blog.csdn.net/hsl_1990_08_15/article/details/83026183

6、找到docker-storage文件

[root@localhost ~]# vi /etc/sysconfig/docker

我加了上图用红色圈住的一段代码

编辑后保存退出,: wq

7、接着重新启动docker,OK

[root@localhost ~]# systemctl restart docker
[root@localhost ~]# 

docker启动,重启,关闭命令

docker官网地址  https://www.docker.com/

docker启动命令,docker重启命令,docker关闭命令

启动        systemctl start docker
守护进程重启   sudo systemctl daemon-reload
重启docker服务   systemctl restart  docker
重启docker服务  sudo service docker restart
关闭docker service docker stop
关闭docker systemctl stop docker

运行镜像 docker run -d -p 6379:6379 --name myredis

猜你喜欢

转载自www.cnblogs.com/zhulina-917/p/10216484.html