ebeigarts / dokku-private-registry

Private docker registry server deployed as a dokku app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dokku Private Registry

Private registry server deployed as a dokku app with HTTP Basic auth using AUTH_USER and AUTH_PASSWORD env variables.

Setup

dokku apps:create my-registry
dokku config:set my-registry REGISTRY_HTTP_SECRET=$(openssl rand -hex 64)
dokku config:set my-registry AUTH_USER=user AUTH_PASSWORD=$(openssl rand -hex 16)
dokku storage:mount my-registry /var/lib/dokku/data/storage/my-registry:/var/lib/registry
dokku ps:set-restart-policy my-registry unless-stopped
dokku domains:add my-registry my-registry.example.com
dokku letsencrypt my-registry

Deploy

git remote add dokku dokku@dokku.example.com:my-registry
git push dokku master

Test

docker login -u user -p password my-registry.example.com

docker pull busybox:latest
docker tag busybox:latest my-registry.example.com/user/busybox:latest
docker push my-registry.example.com/user/busybox:latest
docker rmi busybox:latest my-registry.example.com/user/busybox:latest
docker pull my-registry.example.com/user/busybox:latest

Garbage Collect

dokku run my-registry /bin/registry garbage-collect /app/config.yml

About

Private docker registry server deployed as a dokku app


Languages

Language:Shell 69.1%Language:Dockerfile 30.9%