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

Modify port in example : proxy-headers #191

Closed
felixilgatto opened this issue May 8, 2021 · 5 comments
Closed

Modify port in example : proxy-headers #191

felixilgatto opened this issue May 8, 2021 · 5 comments
Labels

Comments

@felixilgatto
Copy link

felixilgatto commented May 8, 2021

Hi,
It is certainly not very complicated but I am trying to modify the port of the nginx server in the proxy headers example. I would like expose port 8000 instead of port 80. I tried to modify the port in the docker-compose.yml but when I do that the UI is still accessible but I can no longer push the images.

So I think my problem comes from the communication between registry and the UI.
I have not found any solution and it is surely not very complicated.

My modification of the docker-compose.yml.

version: '2.0'
services:
  registry:
    image: registry:2.7
    volumes:
      - ./registry-data:/var/lib/registry
      - ./registry-config/credentials.yml:/etc/docker/registry/config.yml
      - ./registry-config/htpasswd:/etc/docker/registry/htpasswd
    networks:
      - registry-ui-net

  ui:
    image: joxit/docker-registry-ui:latest
    ports:
      - 8000:80 # instead of 80:80
    environment:
      - REGISTRY_TITLE=My Private Docker Registry
      - NGINX_PROXY_PASS_URL=http://registry:5000
      - NGINX_PROXY_HEADER_X_Forwarded_For=$$proxy_add_x_forwarded_for
      - SINGLE_REGISTRY=true
    volumes:
      - ./nginx.env:/etc/nginx/.env
    depends_on:
      - registry
    networks:
      - registry-ui-net

networks:
  registry-ui-net

The error then I trying to push a images in a repo.

> docker push localhost:8000/backend:latest
The push refers to repository [localhost:8000/backend]
f31b5bd6df06: Pushing [==================================================>]  3.906MB/3.906MB
71818d1a0115: Pushing [==================================================>]  8.933MB/8.933MB
a402f7a25c54: Pushing [==================================================>]  16.16kB
c9b55b4f8fe8: Pushing [==================================================>]  725.1kB/725.1kB
070b66cea4a0: Retrying in 1 second
7802950192bc: Waiting
119ee89d56bc: Waiting
b2d5eeeaba3a: Waiting
dial tcp [::1]:80: connect: connection refused

Thank you.

@Joxit
Copy link
Owner

Joxit commented May 8, 2021

Hi, thank you for using my project 😄

I'm sorry, I think this issue has been introduced with 2.0.0 (see #88 #113) I've forgotten to add the default NGINX_PROXY_HEADER_Host environement.

@felixilgatto
Copy link
Author

Thank you for your reply. I apologize for not having studied the other issues sufficiently. The project will be really useful to me in my private server :)

@Joxit
Copy link
Owner

Joxit commented May 8, 2021

Should be OK with 2.0.1, pull the new image

@Joxit
Copy link
Owner

Joxit commented May 8, 2021

I'm glad that you are happy with my project 😄

Don't worry, it was also my fault, I failed my upgrade from 1.x to 2.x 😓

@felixilgatto
Copy link
Author

No problemo :D

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

No branches or pull requests

2 participants