In this guide we'll see how to start a private docker registry. The perfect place to store all the images of projects you don't want to make public on…
> Archived article from 2017, from the old nutellino.it: commands and versions may be out of date.
In this guide we'll see how to start a private docker registry.
The perfect place to store all the images of projects you don't want to make public on hub.docker.com.
# Let's encrypt data path# foldersLETSENCRYPT_CACHE=./cache
LETSENCRYPT_PATH=./letsencrypt
# fileHTACCESS_REGISTRY=./password_registry
# PortsHTTP_PORT=80HTTPS_PORT=443# Registry data path# foldersREGISTRY_DATA=./datalocal
# configREGISTRY_DOMAIN=registry.domain.tld
REGISTRY_EMAIL=demo@domain.tld
# Registry web browser data path# foldersREGWEB_CONF=./conf
REGWEB_DB=./db
# PortsREGWEB_HTTP_PORT=8080
You can leave everything as is except for two parameters:
REGISTRY_DOMAIN, which will hold the domain name of our registry
REGISTRY_EMAIL, which will hold the email address of the domain's owner
Once these changes are done we can go ahead and start everything with
bash
docker-compose up -d
Since issuing the certificate will take a while, we'll probably have to stop and restart the solution a couple of times. In the end, though, we'll have our registry up and running!
Here's a short video of starting and logging into a test registry:
~/archivio
$ cat ~/archivio/docker-registry-privato.md
WARNING: this file is from 2017.
I wrote it, but a me from a few years ago: it may no longer reflect what I think or what I can do.