Docker container for creating an x509 certificate authority and zero to many certificates, signed by that authority
First checks to see if certificate authority files exist. If they don't, it will create a new certificate authority. It then creates new certificates (from a list of certificate "common names"), unless they exist already.
Certificates are created in /certs
. It's a good idea to have this as a shared volume, so you can use the certificates in other containers.
The docker image exits once it has completed, and can be run any number of times without undue side effects.
- CERTS List of common names to create new certificates.
- AUTHORITY_NAME Certificate authority name
- AUTHORITY_PASSWORD Certificate authority password
- COMPANY Certificate authority company name
- DEPARTMENT Certificate authority department
- COUNTRY_CODE Certificate authority country code
- STATE Certificate authority state
- CITY Certificate authority city
See example Docker Compose file.
docker run \
-v `pwd`/certs:/certs \
-e CERTS='host1 host2 host3' \
-e AUTHORITY_NAME=Automated \
-e AUTHORITY_PASSWORD=PLEASE_CHANGE_ME \
-e COMPANY=COMPANY_NAME \
-e DEPARTMENT=Operations \
-e COUNTRY_CODE=GB \
-e STATE=London \
-e CITY=London \
dougg/certificate-master
As per the example Docker Compose file, you'll want to have /certs as a volume, so you can use these certificates.