mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-25 03:05:32 +00:00
Add blank lines before headers
This commit is contained in:
@@ -95,10 +95,12 @@ $ sudo apt install docker-ce docker-ce-cli containerd.io
|
||||
> 若你想安装测试版的 Docker,请从 test.docker.com 获取脚本
|
||||
|
||||
```bash
|
||||
|
||||
# $ curl -fsSL test.docker.com -o get-docker.sh
|
||||
|
||||
$ curl -fsSL get.docker.com -o get-docker.sh
|
||||
$ sudo sh get-docker.sh --mirror Aliyun
|
||||
|
||||
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
|
||||
```
|
||||
|
||||
|
||||
@@ -86,10 +86,12 @@ $ sudo apt-get install docker-ce docker-ce-cli containerd.io
|
||||
> 若你想安装测试版的 Docker,请从 test.docker.com 获取脚本
|
||||
|
||||
```bash
|
||||
|
||||
# $ curl -fsSL test.docker.com -o get-docker.sh
|
||||
|
||||
$ curl -fsSL get.docker.com -o get-docker.sh
|
||||
$ sudo sh get-docker.sh --mirror Aliyun
|
||||
|
||||
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
|
||||
```
|
||||
|
||||
|
||||
@@ -98,10 +98,12 @@ $ sudo dnf -y install docker-ce-18.06.1.ce
|
||||
> 若你想安装测试版的 Docker,请从 test.docker.com 获取脚本
|
||||
|
||||
```bash
|
||||
|
||||
# $ curl -fsSL test.docker.com -o get-docker.sh
|
||||
|
||||
$ curl -fsSL get.docker.com -o get-docker.sh
|
||||
$ sudo sh get-docker.sh --mirror Aliyun
|
||||
|
||||
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
|
||||
```
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ CentOS 8/Stream 默认使用 `nftables`。Docker 在新版本中已提供 `nftab
|
||||
更改 `/etc/firewalld/firewalld.conf`
|
||||
|
||||
```bash
|
||||
|
||||
## FirewallBackend=nftables
|
||||
|
||||
FirewallBackend=iptables
|
||||
@@ -103,10 +104,12 @@ $ firewall-cmd --reload
|
||||
> 若你想安装测试版的 Docker,请从 test.docker.com 获取脚本
|
||||
|
||||
```bash
|
||||
|
||||
# $ curl -fsSL test.docker.com -o get-docker.sh
|
||||
|
||||
$ curl -fsSL get.docker.com -o get-docker.sh
|
||||
$ sudo sh get-docker.sh --mirror Aliyun
|
||||
|
||||
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
|
||||
|
||||
```
|
||||
|
||||
@@ -111,10 +111,12 @@ $ sudo apt-get install docker-ce
|
||||
> 若你想安装测试版的 Docker,请从 test.docker.com 获取脚本
|
||||
|
||||
```bash
|
||||
|
||||
# $ curl -fsSL test.docker.com -o get-docker.sh
|
||||
|
||||
$ curl -fsSL get.docker.com -o get-docker.sh
|
||||
$ sudo sh get-docker.sh --mirror Aliyun
|
||||
|
||||
# $ sudo sh get-docker.sh --mirror AzureChinaCloud
|
||||
|
||||
```
|
||||
|
||||
@@ -148,15 +148,18 @@ sudo yum versionlock delete all
|
||||
##### 挂载 ISO 镜像搭建本地 File 源
|
||||
|
||||
```bash
|
||||
|
||||
## 删除其他网络源
|
||||
|
||||
rm -f /etc/yum.repos.d/*
|
||||
|
||||
## 挂载光盘或者iso镜像
|
||||
|
||||
mount /dev/cdrom /mnt
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
## 添加本地源
|
||||
|
||||
cat >/etc/yum.repos.d/local_files.repo<< EOF
|
||||
@@ -170,6 +173,7 @@ EOF
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
## 测试刚才的本地源,安装createrepo软件
|
||||
|
||||
yum clean all
|
||||
@@ -179,15 +183,19 @@ yum install createrepo -y
|
||||
##### 根据本地文件搭建 BASE 网络源
|
||||
|
||||
```bash
|
||||
|
||||
## 安装apache 服务器
|
||||
|
||||
yum install httpd -y
|
||||
|
||||
## 挂载光盘
|
||||
|
||||
mount /dev/cdrom /mnt
|
||||
|
||||
## 新建centos目录
|
||||
|
||||
mkdir /var/www/html/base
|
||||
|
||||
## 复制光盘内的文件到刚才新建的目录
|
||||
|
||||
cp -R /mnt/Packages/* /var/www/html/base/
|
||||
@@ -201,6 +209,7 @@ systemctl start httpd
|
||||
在有网络的服务器上下载 Docker-ce 镜像
|
||||
|
||||
```bash
|
||||
|
||||
## 下载清华的镜像源文件
|
||||
|
||||
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
|
||||
@@ -208,9 +217,11 @@ sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
## 新建 docker-ce目录
|
||||
|
||||
mkdir /tmp/docker-ce/
|
||||
|
||||
## 把镜像源同步到镜像文件中
|
||||
|
||||
reposync -r docker-ce-stable -p /tmp/docker-ce/
|
||||
@@ -221,6 +232,7 @@ reposync -r docker-ce-stable -p /tmp/docker-ce/
|
||||
把下载的 docker-ce 文件夹复制到离线的服务器
|
||||
|
||||
```bash
|
||||
|
||||
## 把docker-ce 文件夹复制到/var/www/html/docker-ce
|
||||
|
||||
## 重建索引
|
||||
@@ -235,6 +247,7 @@ rm -f /etc/yum.repos.d/*
|
||||
cat >/etc/yum.repos.d/local_files.repo<< EOF
|
||||
[local_base]
|
||||
name=local_base
|
||||
|
||||
## 改成B服务器地址
|
||||
|
||||
baseurl=http://x.x.x.x/base
|
||||
@@ -243,6 +256,7 @@ gpgcheck=0
|
||||
proxy=_none_
|
||||
[docker_ce]
|
||||
name=docker_ce
|
||||
|
||||
## 改成B服务器地址
|
||||
|
||||
baseurl=http://x.x.x.x/docker-ce
|
||||
|
||||
Reference in New Issue
Block a user