ARM architecture server installation docker

My server information is:

insert image description here

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

Online:
  1. yum update

  2. yum install -y docker-engine

  3. vim /etc/docker/daemon.json add the following content

    {

    “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

Offline mode:
  1. Go to the official website to download the docker offline installation package

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

  1. Upload the docker-19.03.9.tgz compressed package to the temp folder in the server

  2. Unzip: tar -zxvf docker-19.03.9.tgz

  3. Move all the decompressed docker folders to the /usr/bin directory: sudo cp -p docker/* /usr/bin/

  4. Register docker as a system service
    In the /usr/lib/systemd/system/ directory, create a docker.service file: sudo touch /usr/lib/systemd/system/docker.service
    Edit the docker.service file: sudo vim /usr/ lib/systemd/system/docker.service
    and add the following content

 [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. Reload unit configuration file: sudo systemctl daemon-reload

  2. Start docker: sudo systemctl start docker

  3. Set boot self-start: sudo systemctl enable docker

  4. check status

    View docker status: sudo systemctl status docker

    View docker system information: docker info

    Check the docker version: docker -v

10. The effect after installation
insert image description here

Guess you like

Origin blog.csdn.net/weixin_53458434/article/details/128100500