[root@localhost /]# docker -v
Docker version 1.13.1, build 07f3374/1.13.1
(2)启动docker
命令:systemctl start docker
此时出现如下错误:
[root@localhost /]# systemctl start docker -l
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
(3)查看docker服务状态
命令:systemctl status docker.service -l
[root@localhost /]# systemctl status docker.service -l
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2019-01-13 21:43:04 EST; 11min ago
Docs: http://docs.docker.com
Process: 19402 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: 19402 (code=exited, status=1/FAILURE)
Jan 13 21:43:02 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Jan 13 21:43:02 localhost.localdomain dockerd-current[19402]: time="2019-01-13T21:43:02.863392498-05:00" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
Jan 13 21:43:02 localhost.localdomain dockerd-current[19402]: time="2019-01-13T21:43:02.870925199-05:00" level=info msg="libcontainerd: new containerd process, pid: 19407"
Jan 13 21:43:03 localhost.localdomain dockerd-current[19402]: time="2019-01-13T21:43:03.881498845-05:00" level=warning msg="overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type support will no longer be supported in Docker 1.16."
Jan 13 21:43:04 localhost.localdomain dockerd-current[19402]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux in docker (--selinux-enabled=false)
Jan 13 21:43:04 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jan 13 21:43:04 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Jan 13 21:43:04 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Jan 13 21:43:04 localhost.localdomain systemd[1]: docker.service failed.
Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux in docker (--selinux-enabled=false)
[root@localhost /]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.