docker konradkleine/docker-registry-frontend:v2 运行之后点击repository报错

docker konradkleine/docker-registry-frontend:v2 运行之后访问报错GET http://localhost:8082/v2/_catalog?n=&last= 503 (Service Unavailable)

启动容器配置本地镜像ip配置未生效,

docekr-compose.yml 内容

version: '3.1'
services:
  frontend:
    image: konradkleine/docker-registry-frontend:v2
    restart: always
    container_name: registry-frontend
    ports:
      - 8082:80
    volumes:
      - ./certs/frontend.crt:/etc/apache2/server.crt:ro
      - ./certs/frontend.key:/etc/apache2/server.key:ro
    environment:
      - ENV_DOCKER_REGISTRY_HOST=192.169.0.109
      - ENV_DOCKER_REGISTRY_PORT=5000
jinghuashuiyue2
幻丨灵 ENV_DOCKER_REGISTRY_HOST 该参数不能配置为宿主机的ip地址 ,必须为容器内部的地址,推荐使用links配置或aliases配置来另起容器
5 个月之前 回复
zhemenanna
[L飘逸;@ version: '3.1' services: frontend: image: konradkleine/docker-registry-frontend:v2 restart: always container_name: registry-frontend ports: - 8082:80 volumes: - ./certs/frontend.crt:/etc/apache2/server.crt:ro - ./certs/frontend.key:/etc/apache2/server.key:ro environment: - ENV_DOCKER_REGISTRY_HOST=192.169.0.109 - ENV_DOCKER_REGISTRY_PORT=5000
6 个月之前 回复

1个回答

version: "3"
services:
registry:
image: registry
restart: always
container_name: registry
ports:
- 5000:5000
volumes:
- /usr/local/docker/registry/data:/var/lib/registry
networks:
mynet:
aliases:
- registry

frontend:
image: konradkleine/docker-registry-frontend:v2
restart: always
container_name: frontend
ports:
- 8080:80
volumes:
- ./certs/frontend.crt:/etc/apache2/server.crt:ro
- ./certs/frontend.key:/etc/apache2/server.key:ro
environment:
#须为容器内部可访问的地址,不可配置为宿主机地址
- ENV_DOCKER_REGISTRY_HOST=registry
- ENV_DOCKER_REGISTRY_PORT=5000
networks:
mynet:
aliases:
- frontend

networks:
mynet:
external: true

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐