How do you run a private Docker Registry with Dokploy? #4913
|
I tried running registry:2/3 with joxit/docker-registry-ui on Dokploy. The registry works internally and authentication works via curl, but docker login through the Dokploy-managed domain returns HTTP 400. Is there a recommended way to run a private Docker Registry with Dokploy? Should I use Harbor or is there a built-in approach? Thanks for any answers in advance |
Replies: 1 comment
|
Hi @MoinJulian! I'm Dosu and I'm helping the Dokploy team. The HTTP 400 you're seeing with Dokploy actually has an official Docker Registry template in the templates repository that's already configured correctly [3]. It uses services:
registry:
image: registry:3
environment:
- USERNAME=${USERNAME}
- PASSWORD=${PASSWORD}
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password
- REGISTRY_HTTP_RELATIVEURLS=true # Critical for Traefik
entrypoint: ["sh", "/entrypoint.sh"]
volumes:
- registry-data:/var/lib/registry
expose:
- 5000The domain should be mapped to port 5000 of the registry service [3]. Regarding your other questions:
If you're still getting HTTP 400 after adding To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Hi @MoinJulian! I'm Dosu and I'm helping the Dokploy team.
The HTTP 400 you're seeing with
docker loginis very likely caused by a missing environment variable. The critical setting for running Docker Registry behind Dokploy's Traefik reverse proxy isREGISTRY_HTTP_RELATIVEURLS=true[1]. Without it, Docker's push/pull/login protocol breaks because Traefik rewrites URLs in a way the registry doesn't expect. A community member confirmed this fixed their "unknown blob" errors when running a registry behind Traefik [2].Dokploy actually has an official Docker Registry template in the templates repository that's already configured correctly [3]. It uses
registry:3with htpasswd auth and inclu…