[root@liuawen local]# docker -v
Docker version 1.13.1, build cccb291/1.13.1
[root@liuawen local]#

启动、关闭与重启docker时

[root@liuawen ~]# service docker stop
Redirecting to /bin/systemctl stop docker.service
[root@liuawen ~]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@liuawen ~]# service docker restart
Redirecting to /bin/systemctl restart docker.service
[root@liuawen ~]#

出现这个Redirecting to /bin/systemctl start docker.service。

https://docs.docker.com/config/daemon/systemd/

大多数Linux发行版本使用systemctl启动服务,如果不是那就尝试使用下service来启动。

我的环境是使用这个systemctl start docker来启动。

查看下ps -ef | grep "docker" docker启动了

启动docker:systemctl start docker

停止docker:systemctl stop docker

重启docker:systemctl restart docker

[root@liuawen local]# systemctl start docker
[root@liuawen local]# ps -ef | grep "docker"
root 25171 1 0 11:14 ? 00:00:00 /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 --selinux-enabled --log-driver=journald --signature-verification=false --storage-driver overlay2
root 25177 25171 0 11:14 ? 00:00:00 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --runtime-args --systemd-cgroup=true
root 25887 21199 0 11:24 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]# systemctl stop docker
[root@liuawen local]# ps -ef | grep "docker"
root 25910 21199 0 11:24 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]# systemctl restart docker
[root@liuawen local]# ps -ef | grep "docker"
root 25960 1 2 11:24 ? 00:00:00 /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 --selinux-enabled --log-driver=journald --signature-verification=false --storage-driver overlay2
root 25966 25960 0 11:24 ? 00:00:00 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --runtime-args --systemd-cgroup=true
root 26063 21199 0 11:25 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]#

使用systemctl 来启动、停止、重启docker都可以了。

【Docker】Docker启动停止重启 Redirecting to /bin/systemctl start docker.service的更多相关文章

  1. nginx启动失败:Redirecting to /bin/systemctl start nginx.service Failed to start nginx.service: Unit not found.

    解决方法: 是因为nginx没有有添加到系统服务,手动手动添加一个即可. 在 /etc/init.d/下创建名为nginx的启动脚本即可,内容如下: #!/bin/bash # # chkconfig ...

  2. 重启ssh服务出现Redirecting to /bin/systemctl restart sshd.service

    转自:https://blog.csdn.net/caijunfen/article/details/70599138 CentOs 重启ssh服务的命令如下: # service sshd rest ...

  3. 安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式

    安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式 1)首先,检查服务器已安装的tf ...

  4. Linux Redirecting to /bin/systemctl restart iptables.service

    方案 一 1.昨天碰到一个错误,linux下输入命令:service iptables restart时,总会报下面一个提示很简单,这句话的意思就是让你重定向到systemctl然后再启用,白话就是说 ...

  5. 【linux】CentOS 6 使用cron定时任务,报错:Redirecting to /bin/systemctl restart crond.service

    在centos7上,执行cron定时任务的相关命令,反馈如下: 定时任务执行,反馈是: Redirecting to /bin/systemctl restart crond.service 原因: ...

  6. linux出现Redirecting to /bin/systemctl start mysqld.service,解决方法

    上去就是一个命令     /bin/systemctl start httpd.service

  7. 阿里云报错Redirecting to /bin/systemctl restart sshd.service

    转:http://blog.csdn.net/caijunfen/article/details/70599138 云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  ...

  8. Redirecting to /bin/systemctl restart mysql. service Failed to restart mysql.service: Unit not found.

    使用如下命令操作mysql即可: systemctl restart mysqld.service systemctl start mysqld.service systemctl stop mysq ...

  9. Linux Systemd——在RHEL/CentOS 7中启动/停止/重启服务

    RHEL/CentOS 7.0中一个最主要的改变,就是切换到了systemd.它用于替代红帽企业版Linux前任版本中的SysV和Upstart,对系统和服务进行管理.systemd兼容SysV和Li ...

随机推荐

  1. react中对内容点击复制

    在react中一个标签内,点击这个标签直接复制标签内的内容 如图,我的需求是点击id这个标签实现对id的一键复制,所以请看copyHander函数 先创建一个Range对象,Range 对象表示文档的 ...

  2. Salesforce LWC学习(二十八) 复制内容到系统剪贴板(clipboard)

    本篇参考: https://developer.mozilla.org/zh-CN/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipb ...

  3. Java中多线程安全问题实例分析

    案例 1 package com.duyang.thread.basic.basethread; 2 3 /** 4 * @author :jiaolian 5 * @date :Created in ...

  4. centos7安装zabbix server5.0

    安装zabbix源 1.rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarc ...

  5. linux目录和Windows目录对比

    linux目录和Windows目录对比 我们应该知道 Windows 有一个默认的安装目录专门用来安装软件.Linux 的软件安装目录也应该是有讲究的,遵循这一点,对后期的管理和维护也是有帮助的. / ...

  6. HTTP Error 405.0 - Method Not Allowed 无法显示您正在查找的页面,因为使用了无效方法(HTTP 谓词)。

    将submit改成button即可   因为触发了form表单

  7. 报错 ncclCommInitRank failed.

    环境 4 GeForce GTX 1080 GPUS docker image nnabla/nnabla-ext-cuda-multi-gpu:py36-cuda102-mpi3.1.6-v1.14 ...

  8. android studio 找不到真机设备

    连接USB之后没有显示连接,如下图 设备管理器: 解决:重启电脑

  9. Qt学习笔记-了解信号与槽-自定义信号-自定义槽

    信号与槽是连接不同控件直接的渠道. 这里以Horizontal Slider和Dial两个控件举例. 目的是在改变滑条的数值时,Dial也随之响应. 首先添加两个控件. 然后按快捷键F4进入控件编辑模 ...

  10. 关于BackTop按钮的实现

    今天在处理,首页面的制作的时候,在实现backtop按键的时候,有些思路,作为记录. 功能为,点击backtop即可,立马跳到首页的最上面,且backtop只有在页面后1/2处才显示出来. 首先,我们 ...