您好,登錄后才能下訂單哦!
創建Docker二級制文件存放目錄
mkdir /opt/kube/bin/ -pv
# ll
total 155108
-rwxr-xr-x 1 root root 37598450 Sep 19 11:10 docker
-rwxr-xr-x 1 root root 11748168 Sep 19 11:13 docker-compose
-rwxr-xr-x 1 root root 26393752 Sep 19 11:13 docker-containerd
-rwxr-xr-x 1 root root 14725592 Sep 19 11:13 docker-containerd-ctr
-rwxr-xr-x 1 root root ?4173632 Sep 19 11:13 docker-containerd-shim
-rwxr-xr-x 1 root root 53076360 Sep 19 11:11 dockerd
-rwxr-xr-x 1 root root ? 764144 Sep 19 11:13 docker-init
-rwxr-xr-x 1 root root ?2837280 Sep 19 11:13 docker-proxy
-rwxr-xr-x 1 root root ?7495056 Sep 19 11:13 docker-runc
配置啟動文件
# vim /etc/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.io
[Service]
Environment="PATH=/opt/kube/bin:/bin:/sbin:/usr/bin:/usr/sbin"
ExecStart=/opt/kube/bin/dockerd?
ExecStartPost=/sbin/iptables -I FORWARD -s 0.0.0.0/0 -j ACCEPT
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
RestartSec=5
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Delegate=yes
KillMode=process
[Install]
WantedBy=multi-user.target
創建軟連接
ln -s /bin/docker?/opt/kube/bin/docker?
啟動Docker服務及設置開機啟動
sudo systemctl start docker
sudo systemctl enable docker
添加appuser使用權限
sudo usermod -a -G docker appuser
sudo systemctl daemon-reload
sudo systemctl restart docker
newgrp docker?
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。