Self-Hosted Docker Registry with auth
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
auth_server
caddy
docker_registry/config
README.md
docker-compose.yml

README.md

Self-Hosted Docker Registry

Introduction

This is a Docker Registry that has token authentication all under the same domain. It was built for a specific use case, however with the configuration files being exposed it can be changed to meet other needs.

Requirements

Installing the two pieces of software below will be all that you need to

Getting started

First you'll need to generate certs for the token auth for docker registry (any values can be put into the cert)

cd auth_server/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.pem

Next, bring up all the containers

docker-composer up -d

Things to be aware of

Some images generated by older versions of Docker may fail when pushing to this registry. Try rebuilding the affected layers. The github issue about this error has more information about what to do.

"Unexpected EOF" is an error than can occur due to a timeout on Caddy being set too low, or the maxrequestbody size being set too low. Layer could also be corrupted, and if changing the timeout and maxrequestbody doesn't solve the problem then refer to the previous point.

Caddy is configured to auto-request Let's Encrypt TLS certificates, however it is possible to include your own if you already have some.

Thanks

This wouldn't be possible without the work of others