Skip to content

Commit ff765ac

Browse files
committed
vault backup: 2025-06-29 19:53:00
1 parent aea2d65 commit ff765ac

4 files changed

Lines changed: 42 additions & 0 deletions

File tree

CICD/Docker/Proxy.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
```bash
3+
4+
# wsl2 get windows host
5+
HOST_IP=$(ip route show default | awk '{ print $3 }')
6+
7+
sudo mkdir -p /etc/systemd/system/docker.service.d/
8+
cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf
9+
[Service]
10+
Environment="HTTP_PROXY=http://${HOST_IP}:7890"
11+
Environment="HTTPS_PROXY=http://${HOST_IP}:7890"
12+
Environment="NO_PROXY=localhost,127.0.0.1"
13+
EOF
14+
15+
echo "reloading systemctl daemon..."
16+
sudo systemctl daemon-reexec
17+
sudo systemctl daemon-reload
18+
echo "restarting docker daemon..."
19+
sudo systemctl restart docker
20+
21+
echo "lookuping docker proxy env..."
22+
systemctl show --property=Environment docker
23+
24+
echo "to cancel proxy, delete /etc/systemd/system/docker.service.d/http-proxy.conf"
25+
```

CICD/Docker/hub.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- https://hub.docker.com
2+
3+
- 仓库必须有latest tag才能用latest tag进行拉去,而不是自动给最新的tag

OS/Linux/Proxy.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- 设置变量
2+
- http_proxy
3+
- https_proxy
4+
- all_proxy
5+
- 一般只需要设置`http://host:port`即可,windows无all_proxy
6+

OS/Windows/WSL/Proxy.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```bash
2+
PROXY_PORT=7890
3+
WIN_HOST=$(ip route show | grep -i default | awk '{ print $3}')
4+
export WIN_HOST=$WIN_HOST
5+
export http_proxy=http://$WIN_HOST:$PROXY_PORT
6+
export https_proxy=http://$WIN_HOST:$PROXY_PORT
7+
export all_proxy=socks5h://$WIN_HOST:$PROXY_PORT
8+
```

0 commit comments

Comments
 (0)