docker-registry-ui icon indicating copy to clipboard operation
docker-registry-ui copied to clipboard

Can't make proxy to work

Open pztrn opened this issue 3 years ago • 2 comments
trafficstars

I'm trying to get 2.1.0 to work with registry using proxy method but unable to push images.

My compose file:

version: "2.4"

services:
  registry:
    image: "registry:2.7.1"
    restart: always
    volumes:
      - "/root/registry/data:/var/lib/registry"
    environment:
      REGISTRY_STORAGE_DELETE_ENABLED: "true"

  webui:
    image: "joxit/docker-registry-ui:2.1.0"
    restart: always
    ports:
      - "192.168.1.2:28880:80"
    environment:
      REGISTRY_TITLE: "pztrn's Private Registry"
      NGINX_PROXY_PASS_URL: http://registry:5000
      SINGLE_REGISTRY: "true"
      DELETE_IMAGES: "true"
    depends_on:
      - registry

I've modified docker's configuration to use my registry as insecure and used registry.pztrn.internal domain which routed via Caddy. And here's what happen:

docker push registry.pztrn.internal/theimage:0.0.16
The push refers to repository [registry.pztrn.internal/theimage]
65bba11443ba: Retrying in 4 seconds
addbaed7634c: Layer already exists
aa9d9b569731: Retrying in 4 seconds
07d3c46c9599: Retrying in 4 seconds

Registry is definetely accessible via /v2/_catalog path, so no problems here, but I suppose there might be an issue with nginx configuration because I have this in logs:

webui_1     | 2021/12/20 09:31:50 [warn] 135#135: *27 a client request body is buffered to a temporary file /var/cache/nginx/client_temp/0000000001, client: 192.168.1.2, server: localhost, request: "PATCH /v2/theimage/blobs/uploads/af68d7a4-84f7-43cd-9c6d-af5ea790b928?_state=Sh9ut4fdxMeLYqzv9wBnhskJ1leXex3jbpzkPdd6x6F7Ik5hbWUiOiJyZW1pbmRtZWJvdCIsIlVVSUQiOiJhZjY4ZDdhNC04NGY3LTQzY2QtOWM2ZC1hZjVlYTc5MGI5MjgiLCJPZmZzZXQiOjAsIlN0YXJ0ZWRBdCI6IjIwMjEtMTItMjBUMDk6MzE6NDkuODgwNTU4NTcxWiJ9 HTTP/1.1", host: "registry.pztrn.internal"

Maybe this prevents me from using registry in proxy mode? And ideas?

pztrn avatar Dec 20 '21 10:12 pztrn

Just tried to push directly to docker-registry-ui - same result:

The push refers to repository [192.168.1.2:28880/theimage]
65bba11443ba: Retrying in 3 seconds
addbaed7634c: Layer already exists
aa9d9b569731: Retrying in 3 seconds
07d3c46c9599: Retrying in 3 seconds

pztrn avatar Dec 20 '21 17:12 pztrn

Hello, thank you for using my project :smile:

Is this related to #191 #88 or #113 ?

IIRC:

  • These lines prevent nginx buffering when push https://github.com/Joxit/docker-registry-ui/blob/8ddfb1b5ae8f22c39bc335afd9e32abd0d754c7e/nginx/default.conf#L9-L17
  • This one prevent a weird docker registry behavior on image push. You must forward the original host used by the client https://github.com/Joxit/docker-registry-ui/blob/8ddfb1b5ae8f22c39bc335afd9e32abd0d754c7e/debian.dockerfile#L21

Joxit avatar Dec 25 '21 12:12 Joxit

Hi, I close this issue due to inactivity.

Joxit avatar Oct 21 '22 19:10 Joxit