Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 反馈问题:配置了代理,启动不了 #33

Closed
2 of 3 tasks
yuanzhexingtian opened this issue Oct 30, 2024 · 1 comment
Closed
2 of 3 tasks

🐞 反馈问题:配置了代理,启动不了 #33

yuanzhexingtian opened this issue Oct 30, 2024 · 1 comment

Comments

@yuanzhexingtian
Copy link

yuanzhexingtian commented Oct 30, 2024

前置确认

  • 我确认使用的是国外未被墙的服务器,并且服务器规格 >= 1C1G

⚠️ 采用脚本进行部署,非脚本部署问题将不被受理

  • 我确认使用的是最新脚本部署

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues、disscussions和问题总结,没有跟我遇到的问题相关的issue

操作系统类型?

Ubuntu

复现步骤 🕹

services:

docker hub

dockerhub:
container_name: reg-docker-hub
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-hub.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 51000:5000
networks:
- registry-net

ghcr.io

ghcr:
container_name: reg-ghcr
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-ghcr.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 52000:5000
networks:
- registry-net

gcr.io

gcr:
container_name: reg-gcr
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-gcr.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 53000:5000
networks:
- registry-net

k8s.gcr.io

k8sgcr:
container_name: reg-k8s-gcr
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-k8sgcr.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 54000:5000
networks:
- registry-net

registry.k8s.io

k8s:
container_name: reg-k8s
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-k8s.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 55000:5000
networks:
- registry-net

quay.io

quay:
container_name: reg-quay
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-quay.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 56000:5000
networks:
- registry-net

mcr.microsoft.com

mcr:
container_name: reg-mcr
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-mcr.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 57000:5000
networks:
- registry-net

docker.elastic.co

elastic:
container_name: reg-elastic
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-elastic.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 58000:5000
networks:
- registry-net

nvcr.io

nvcr:
container_name: reg-nvcr
image: dqzboy/registry:latest
restart: always
environment:
- OTEL_TRACES_EXPORTER=none
- http=http://192.168.31.111:7890
- https=http://192.168.31.111:7890
volumes:
- /data/commonData/dockerProxy/registry/data:/var/lib/registry
- ./registry-nvcr.yml:/etc/distribution/config.yml
#- ./htpasswd:/auth/htpasswd
ports:
- 59000:5000
networks:
- registry-net

UI

registry-ui:
container_name: registry-ui
image: dqzboy/docker-registry-ui:latest
environment:
- DOCKER_REGISTRY_URL=http://reg-docker-hub:5000
# [必须]使用 openssl rand -hex 16 生成唯一值
- SECRET_KEY_BASE=ef1a5f45fb1a0bd99a6b0ac9afca4131
# 启用Image TAG 的删除按钮
- ENABLE_DELETE_IMAGES=true
- NO_SSL_VERIFICATION=true
restart: always
ports:
- 50000:8080
networks:
- registry-net

networks:
registry-net:

问题描述 😯

docker-compose up -d 之后就出现了问题,config文件没有动

终端日志 📒

reg-k8s-gcr     | panic: Get "https://k8s.gcr.io/v2/": dial tcp 108.177.98.82:443: i/o timeout
reg-k8s-gcr     |
reg-k8s-gcr     |
reg-k8s-gcr     | goroutine 1 [running]:
reg-k8s-gcr     | github.com/distribution/distribution/v3/registry/handlers.NewApp({0x1c03e20, 0xc00016a810}, 0xc0007a1208)
reg-k8s-gcr     |       github.com/distribution/distribution/v3/registry/handlers/app.go:353 +0x1cc5
reg-k8s-gcr     | github.com/distribution/distribution/v3/registry.NewRegistry({0x1c03e20?, 0xc00074be90?}, 0xc0007a1208)
reg-k8s-gcr     |       github.com/distribution/distribution/v3/registry/registry.go:142 +0x56
reg-k8s-gcr     | github.com/distribution/distribution/v3/registry.init.func1(0x2734b00, {0xc0007452e0, 0x1, 0x1})
reg-k8s-gcr     |       github.com/distribution/distribution/v3/registry/registry.go:111 +0x10a
reg-k8s-gcr     | github.com/spf13/cobra.(*Command).execute(0x2734b00, {0xc0007452a0, 0x1, 0x1})
reg-k8s-gcr     |       github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1
reg-k8s-gcr     | github.com/spf13/cobra.(*Command).ExecuteC(0x2734de0)
reg-k8s-gcr     |       github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
reg-k8s-gcr     | github.com/spf13/cobra.(*Command).Execute(0xc0000061c0?)
reg-k8s-gcr     |       github.com/spf13/cobra@v1.8.0/command.go:1039 +0x13
reg-k8s-gcr     | main.main()
reg-k8s-gcr     |       github.com/distribution/distribution/v3/cmd/registry/main.go:26 +0x1a
reg-docker-hub  | panic: Get "https://registry-1.docker.io/v2/": dial tcp 128.242.240.91:443: i/o timeout
reg-docker-hub  |
reg-docker-hub  |
reg-docker-hub  | goroutine 1 [running]:
reg-docker-hub  | github.com/distribution/distribution/v3/registry/handlers.NewApp({0x1c03e20, 0xc000814810}, 0xc0007ca488)
reg-docker-hub  |       github.com/distribution/distribution/v3/registry/handlers/app.go:353 +0x1cc5
reg-docker-hub  | github.com/distribution/distribution/v3/registry.NewRegistry({0x1c03e20?, 0xc000161200?}, 0xc0007ca488)
reg-docker-hub  |       github.com/distribution/distribution/v3/registry/registry.go:142 +0x56
reg-docker-hub  | github.com/distribution/distribution/v3/registry.init.func1(0x2734b00, {0xc00016a6c0, 0x1, 0x1})
reg-docker-hub  |       github.com/distribution/distribution/v3/registry/registry.go:111 +0x10a
reg-docker-hub  | github.com/spf13/cobra.(*Command).execute(0x2734b00, {0xc00016a680, 0x1, 0x1})
reg-docker-hub  |       github.com/spf13/cobra@v1.8.0/command.go:987 +0xab1
reg-docker-hub  | github.com/spf13/cobra.(*Command).ExecuteC(0x2734de0)
reg-docker-hub  |       github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
reg-docker-hub  | github.com/spf13/cobra.(*Command).Execute(0xc0000061c0?)
reg-docker-hub  |       github.com/spf13/cobra@v1.8.0/command.go:1039 +0x13
reg-docker-hub  | main.main()
reg-docker-hub  |       github.com/distribution/distribution/v3/cmd/registry/main.go:26 +0x1a
reg-k8s-gcr exited with code 2

@dqzboy
Copy link
Owner

dqzboy commented Oct 30, 2024

如果是手动部署的,那么代理- http改为 - http_proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants