zoukankan      html  css  js  c++  java
  • docker服务和配置文件

    1 、dockerd & 启动docker 后如何停止。
    先找到dockerd 运行的pid
    cat /etc/run/docker.pid
    比如是pid是 123
    kill -9 pid
    删除文件
    rm /etc/run/docker.pid
    2、设置开机自动启动

    配置service
    vi /usr/lib/systemd/system/docker.service

    [Unit]
    Description=Docker Application Container Engine
    Documentation=https://docs.docker.com
    After=network-online.target firewalld.service
    Wants=network-online.target
    
    [Service]
    Type=notify
    ExecStart=/usr/bin/dockerd
    ExecReload=/bin/kill -s HUP $MAINPID
    LimitNOFILE=infinity
    LimitNPROC=infinity
    TimeoutStartSec=0
    Delegate=yes
    KillMode=process
    Restart=on-failure
    StartLimitBurst=3
    StartLimitInterval=60s
    
    [Install]
    WantedBy=multi-user.target


    systemctl daemon-reload
    systemctl start docker.service
    systemctl enable docker.service #自动启动
    输出如下
    Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service

    3、docker配置文件
    vi /etc/docker/docker.jason

    {
    "registry-mirrors": ["https://registry.docker-cn.com"]
    }

    4、docker,build,ship,run

  • 相关阅读:
    phonegap(cordova)环境配置
    Mobile Web调试工具Weinre (reproduce)
    webstorm快捷键
    学习笔记:乘性操作符之求模
    消息队列原理笔记
    运维wiki
    supervisor 文档
    redis 批量删除 keys
    linux命令和工具
    urllib urllib2学习笔记
  • 原文地址:https://www.cnblogs.com/timlong/p/12992862.html
Copyright © 2011-2022 走看看