当前位置:   article > 正文

ARM架构服务器安装docker_arm安装docker

arm安装docker
我的服务器信息为:

在这里插入图片描述

Linux ecs-1bc7-0001 4.19.90-17.5.ky10.aarch64 #1 SMP Fri Aug 7 13:35:33 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

在线方式:
  1. yum update

  2. yum install -y docker-engine

  3. vim /etc/docker/daemon.json 添加如下内容

    {

    “registry-mirrors”:[“https://yw94ds9k.mirror.aliyuncs.com”],

    “data-root”:“/usr/local/bin/docker”,

    “log-driver”:“json-file”,

    “log-opts”: {“max-size”:“100m”, “max-file”:“2”},

    “experimental”: true

    }

  4. sudo systemctl daemon-reload

  5. sudo systemctl start docker.service

  6. sudo systemctl enable docker

离线方式:
  1. 到官网下载docker离线安装包

wget https://download.docker.com/linux/static/stable/aarch64/docker-19.03.9.tgz

  1. 将docker-19.03.9.tgz压缩包上传到服务器中的temp文件夹下

  2. 解压缩:tar -zxvf docker-19.03.9.tgz

  3. 解压的docker文件夹全部移至/usr/bin目录:sudo cp -p docker/* /usr/bin/

  4. 将docker注册为系统服务
    在/usr/lib/systemd/system/目录下,创建docker.service文件:sudo touch /usr/lib/systemd/system/docker.service
    编辑docker.service文件:sudo vim /usr/lib/systemd/system/docker.service
    然后添加如下内容

 [Unit] 

    Description=Docker Application Container Engine 

    Documentation=http://docs.docker.com 

    After=network.target docker.socket 

    [Service] 

    Type=notify 

    EnvironmentFile=-/run/flannel/docker 
    
    WorkingDirectory=/usr/local/bin 

    ExecStart=/usr/bin/dockerd  -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --selinux-enabled=false --log-opt max-size=1g 

    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=on-failure 
    
    [Install] 

    WantedBy=multi-user.target
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  1. 重载unit配置文件:sudo systemctl daemon-reload

  2. 启动docker:sudo systemctl start docker

  3. 设置开机自启动:sudo systemctl enable docker

  4. 查看状态

    查看docker状态:sudo systemctl status docker

    查看docker系统信息:docker info

    查看docker版本:docker -v

10.安装完的效果
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/157098?site
推荐阅读
相关标签
  

闽ICP备14008679号