centos7 安装docker

Blog2年前 (2023)更新 VoxHuang
822 0 0

yum 包更新到最新

yum update

安装需要的软件包

yum install -y yum-utils device-mapper-persistent-data lvm2

docker安装

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

开机启动

cat > /etc/systemd/system/docker.service <<EOF
[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
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target
EOF
systemctl enable docker

启动docker

sudo systemctl start docker

fast面板

docker run -d \
--restart=always \
--name fast \
-p 9000:8081 \
-d -v /var/run/docker.sock:/var/run/docker.sock \
wangbinxingkong/fast
© 版权声明

相关文章

暂无评论

暂无评论...