docker-sslgen

Stars
5

Docker SSL Generator

An image which helps with managing SSL certs. This, when started, will generate a CA cert (if one doesn't exist) and SSL cert for your use.

You will be prompted for all fields (CN, Org, email, etc). You can start an container from this image N times and it will create and store whatever certs you specify. Once created you can mount the volumes from this to whatever containers require an SSL cert using --volumes-from. Certs are stored in /var/ssl/certs

When starting the container you must use interactive mode so you can provide input about the certs to be created.

Quickstart

Acquire the source files.

In a console/terminal that can do docker commands:

docker build -t sslgen .
docker run --name sslgen -ti sslgen

When starting the first time, the container will create:

  • a Certificate Authority (CA)
  • the first certificate

It is done by answering the questions:

An example of using --volumes-from:

Create, and start:

docker create --volumes-from sslgen --name sslgen_demo -ti alphine /bin/ash
docker start -ai sslgen_demo

Inspect /var/ssl:

ls -lR /var/ssl