Centos7.6 使用二进制安装docker

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7.6 使用二进制安装docker相关的知识,希望对你有一定的参考价值。

创建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

启动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?

以上是关于Centos7.6 使用二进制安装docker的主要内容,如果未能解决你的问题,请参考以下文章

centos7.6配置mysql5.7二进制

CentOS7下MySQL8的二进制基本安装配置

如何在linux系统中centos7.6上面安装mysql数据库

gogs 二进制安装

#yyds干货盘点#使用二进制安装包的方式安装docker

CentOS7.6安装Maven