• Portainer添加Endpoints


    用它管理别的服务器上的docker镜像和容器

    先尝试在 /etc/docker/daemon.json种做修改

    {
    "hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]
    }

    但是启动docker的时候直接报错

    [root@iZ1la3d1xbmukrZ docker]# vim daemon.json
    [root@iZ1la3d1xbmukrZ docker]# systemctl daemon-reload
    [root@iZ1la3d1xbmukrZ docker]# systemctl restart docker
    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
    [root@iZ1la3d1xbmukrZ docker]# 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: start-limit) since Thu 2020-03-19 22:46:33 CST; 1s ago
         Docs: https://docs.docker.com
      Process: 16963 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
     Main PID: 16963 (code=exited, status=1/FAILURE)
    
    Mar 19 22:46:31 iZ1la3d1xbmukrZ systemd[1]: Failed to start Docker Application Container Engine.
    Mar 19 22:46:31 iZ1la3d1xbmukrZ systemd[1]: Unit docker.service entered failed state.
    Mar 19 22:46:31 iZ1la3d1xbmukrZ systemd[1]: docker.service failed.
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: docker.service holdoff time over, scheduling restart.
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: Stopped Docker Application Container Engine.
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: start request repeated too quickly for docker.service
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: Failed to start Docker Application Container Engine.
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: Unit docker.service entered failed state.
    Mar 19 22:46:33 iZ1la3d1xbmukrZ systemd[1]: docker.service failed.
    [root@iZ1la3d1xbmukrZ docker]# ll

     百度了一下没有解决,就直接修改配置文件

    [root@iZ1la3d1xbmukrZ docker]# vim /usr/lib/systemd/system/docker.service
    [root@iZ1la3d1xbmukrZ docker]# systemctl daemon-reload
    [root@iZ1la3d1xbmukrZ docker]# systemctl restart docker
    [root@iZ1la3d1xbmukrZ docker]# lsof -i:2375
    COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
    dockerd 17578 root    6u  IPv6 11048219      0t0  TCP *:2375 (LISTEN)

     在服务器去查看它的docker info

    [root@iZbp143t3oxhfc3ar7jey0Z _data]# docker -H 47.113.271.739 info
    Containers: 8
     Running: 2
     Paused: 0
     Stopped: 6
    Images: 34
    Server Version: 19.03.6
    Storage Driver: overlay2
     Backing Filesystem: extfs
     Supports d_type: true
     Native Overlay Diff: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
     Volume: local
     Network: bridge host ipvlan macvlan null overlay
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init

    发现没有问题

     就可以了

  • 相关阅读:
    2015 Multi-University Training Contest 2 hdu 5306 Gorgeous Sequence
    2015 Multi-University Training Contest 2 hdu 5308 I Wanna Become A 24-Point Master
    2015 Multi-University Training Contest 2 hdu 5303 Delicious Apples
    2015 Multi-University Training Contest 1 y sequence
    BNUOJ 34982 Beautiful Garden
    2015 Multi-University Training Contest 2 Buildings
    HDU 4725 The Shortest Path in Nya Graph
    2015 Multi-University Training Contest 2 Friends
    HDU 4370 0 or 1
    POJ 1847 Tram
  • 原文地址:https://www.cnblogs.com/dalianpai/p/12528081.html
Copyright © 2020-2023  润新知