Secure Private Docker Registry

Intermediate

This tutorial is from open-source community. Access the source code

Introduction

We saw how to run a simple registry container in Part 1, using the official Docker registry image. The registry server can be configured to serve HTTPS traffic on a known domain, so it's straightforward to run a secure registry for private use with a self-signed SSL certificate.

Running a Secured Registry Container in Linux

Generating the SSL Certificate in Linux

The Docker docs explain how to generate a self-signed certificate on Linux using OpenSSL:

mkdir -p certs
openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt
Generating a 4096 bit RSA private key
........++
............................................................++
writing new private key to 'certs/domain.key'

Summary

Congratulations! You have completed the Docker Registry for Linux Parts 2 & 3 lab. You can practice more labs in LabEx to improve your skills.

Other Tutorials you may like