Member-only story
Introduction
In this post I describe how to create a Docker private registry. with Let’s Encrypt. As environment we will use vagrant and Ubuntu 18.04
Environment
Installation
We will need an installed docker and certbot
- Docker installation
$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
- certbot instalaltion
$ sudo add-apt-repository ppa:certbot/certbot -y
$ sudo apt update
$ sudo apt install certbot -y
Creating a Docker registry
Now that we have all the necessary components installed, we can start creating our private registry
#Switch to root
$ sudo su#Get files with certbot
$ certbot certonly --standalone --preferred-challenges http --non-interactive…