海光芯片+麒麟操作系统v10部署docker

1.docker离线部署参考文档

https://codeleading.com/article/9515573273/

2.docker离线包下载地址

http://mirrors.aliyun.com/docker-ce/linux/static/stable/x86_64/

3.部署步骤

# 下载docker-ce的静态文件,可以根据需要修改版本
wget http://mirrors.aliyun.com/docker-ce/linux/static/stable/x86_64/docker-19.03.8-ce.tgz

# 解压文件
tar xzvf docker-19.03.8-ce.tgz
# 把程序拷贝到运行路径中 
sudo cp docker/* /usr/bin/

# 运行服务程序
sudo dockerd &

# 测试
sudo docker run hello-world

 

3.docker设置存储,仓库地址

[root@localhost data]# cat /etc/docker/daemon.json 
{
"exec-opts": ["native.cgroupdriver=systemd"],
"graph": "/data/docker_storage",
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"storage-opts": [
"overlay2.override_kernel_check=true"
],
"insecure-registries" : ["172.16.4.17:8090","152.136.254.160:8090"],
"registry-mirrors": ["https://g427vmjy.mirror.aliyuncs.com"],
"live-restore": true
}

 

4.设置docker开机自启动

[root@localhost data]# cat /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 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
#ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock -H fd:// --containerd=/run/containerd/containerd.sock
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

 

posted @ 2023-01-05 11:51  Leonardo-li  阅读(1393)  评论(0编辑  收藏  举报