zoukankan      html  css  js  c++  java
  • centos7离线安装docker (二进制)

    https://www.cnblogs.com/always-fight/p/11474872.html

    新建路由

    windos:route add 10.2.101.0 mask 255.255.255.0 160.5.1.254
    ssh 10.2.101.19  rancher01-1
    

    离线安装docker
    https://download.docker.com/linux/static/stable/x86_64/  下载离线包地址

    1)setup    

    cd /usr/local/resource/docker
    tar -xvf docker-19.03.4.tgz 
    mv docker/*  /usr/bin/ # 将二进制文件移动到bin下
    

     2)systemd docker.service

    vim /etc/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
    # the default is not to use systemd for cgroups because the delegate issues still
    # exists and systemd currently does not support the cgroup feature set required
    # for containers run by docker
    ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
    ExecReload=/bin/kill -s HUP $MAINPID
    # Having non-zero Limit*s causes performance problems due to accounting overhead
    # in the kernel. We recommend using cgroups to do container-local accounting.
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    # Uncomment TasksMax if your systemd version supports it.
    # Only systemd 226 and above support this version.
    #TasksMax=infinity
    TimeoutStartSec=0
    # set delegate yes so that systemd does not reset the cgroups of docker containers
    Delegate=yes
    # kill only the docker process, not all processes in the cgroup
    KillMode=process
    # restart the docker process if it exits prematurely
    Restart=on-failure
    StartLimitBurst=3
    StartLimitInterval=60s
       
    [Install]
    WantedBy=multi-user.target
    

    授予执行权限:    

    chmod +x /etc/systemd/system/docker.service
    

    然后:    

    systemctl daemon-reload  
    systemctl start docker    
    systemctl enable docker.service  
    

    测试是否成功:

    systemctl status docker 
    docker  -v 
    

    rpm方式安装

    rpm -ivh containerd.io-1.2.2-3.el7.x86_64.rpm
    rpm -ivh container-selinux-2.107-3.el7.noarch.rpm
    rpm -ivh docker-ce-18.09.8-3.el7.x86_64.rpm
    rpm -ivh docker-ce-cli-18.09.8-3.el7.x86_64.rpm
    



  • 相关阅读:
    EF CodeFirst下,当实体结构发生修改怎么更新数据库结构 【常用总结】
    基于 ASP.NET Core 的 EF Core 入门
    autofac 一个接口多个实现的情况
    C#中使用HttpClient来Post数据的内容HttpContent的各种格式
    # 使用HttpClient的post,get 封装
    C# 模拟提交带附件(input type=file)的表单
    C#使用HttpClient上传文件并附带其他参数
    2021年总结一下
    PhpStorm+Xdebug断点调试
    PHP数组排序
  • 原文地址:https://www.cnblogs.com/zjz20/p/12673668.html
Copyright © 2011-2022 走看看