Websoft9 / docker-library

Docker Compose examples of selfhosted FOSS based on official image, just run it.
https://www.websoft9.com
Other
30 stars 14 forks source link

complete docker-compose.yml for [registry] #625

Closed qiaofeng1227 closed 1 week ago

qiaofeng1227 commented 3 weeks ago

What type of your feature request?

chendelin1982 commented 2 weeks ago
chendelin1982 commented 2 weeks ago
server {
    listen 80;

    location / {
        proxy_pass https://registry-1.docker.io;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
qiaofeng1227 commented 2 weeks ago

docker 自身代理:

mkdir -p /etc/systemd/system/docker.service.d/
vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://47.75.113.190:9009/"
Environment="HTTPS_PROXY=https://47.75.113.190:9009/"
Environment="NO_PROXY=localhost,127.0.0.1"

sudo systemctl daemon-reload
sudo systemctl restart docker
[root@iZ8vb9gse4rc3k7hxgadluZ docker.service.d]# docker pull mysql:8.1
Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: net/http: TLS handshake timeout
qiaofeng1227 commented 1 week ago