增加ubuntu1

This commit is contained in:
2026-04-08 20:54:47 +08:00
parent 8bc4697452
commit c7ffd6764b

View File

@@ -753,11 +753,12 @@ ssh ubuntu2 "rm /home/shenwei/docker/n8n/n8n_data/files/<输出文件名>"
### 问题背景
Ubuntu2 服务器直连 Docker Hub 的 443 端口被封,导致 `docker pull/build` 超时。Ubuntu2 上已安装 `proxychains4`,可用于将 Docker 的 TCP 连接通过 SOCKS5 代理转发。
Ubuntu1/2 服务器直连 Docker Hub 的 443 端口被封,导致 `docker pull/build` 超时。Ubuntu1/2 上已安装 `proxychains4`,可用于将 Docker 的 TCP 连接通过 SOCKS5 代理转发。
### 验证 proxychains4 是否可用
```bash
ssh ubuntu1 'proxychains4 curl -s -o /dev/null -w "HTTP %{http_code}" --max-time 8 https://registry-1.docker.io/v2/'
ssh ubuntu2 'proxychains4 curl -s -o /dev/null -w "HTTP %{http_code}" --max-time 8 https://registry-1.docker.io/v2/'
# 预期输出: HTTP 401 (TCP 接通,认证失败表示通道打通)
```
@@ -765,12 +766,14 @@ ssh ubuntu2 'proxychains4 curl -s -o /dev/null -w "HTTP %{http_code}" --max-time
### Docker pull 走代理
```bash
ssh ubuntu1 'proxychains4 docker pull <image>:<tag>'
ssh ubuntu2 'proxychains4 docker pull <image>:<tag>'
```
### Docker build 走代理
```bash
ssh ubuntu1 'proxychains4 docker build --pull=false -t <image>:<tag> <dockerfile-path>'
ssh ubuntu2 'proxychains4 docker build --pull=false -t <image>:<tag> <dockerfile-path>'
```