BlueXIII's Blog

热爱技术,持续学习

0%

K8S离线部署笔记-3-Docker

Docker

1
2
3
4
5
6
7
8
9
10
# 联网环境,准备RPM包
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yumdownloader --assumeyes --destdir=/root/pkg/docker-ce --resolve docker-ce
yumdownloader --assumeyes --destdir=/root/pkg/docker-compose --resolve docker-compose

# 离线环境,安装RPM包
yum install -y --cacheonly --disablerepo=* /root/pkg/docker-ce/*.rpm
systemctl enable docker
systemctl start docker

DockerCompose(可选)

1
2
3
4
5
6
7
8
# 下载二进制
https://github.com/docker/compose/releases

# 拷贝
cp docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

# 赋权
chmod +x /usr/local/bin/docker-compose