Sign inSign up

cyd01/simpleca

By cyd01

•Updated 4 days ago

A simple Certificate Authority

Image
Security
0

1.5K

cyd01/simpleca repository overview

⁠SimpleCA: a simple Certificate Authority

SimpleCA is mainly designed to generate valid server certificates for internal purpose.

⁠How to use

First create a docker volume to save the key and the certificate of the Certificate Authority.

docker volume create ca

Then start your own Certificate Authority

docker run --detach --name simpleca --volume ca:/ca --publish 80 cyd01/simpleca:latest

At first start a valid key and certificate is created (without volume there will be recreated each time the container restart).

Now the Certificate Authority is reachable at local 80 port. To get the CA certificate run

curl -s http://localhost/ca/ca.crt

To get more informations on how to use SimpleCA jump to https://simpleca.piratemind.com⁠.

⁠How to customize

⁠Use your own key and certificate

You can use your own key and certificate of the Certificate Authority. In the container the names must be ca.key and ca.crt. You just have to copy them into the container.

docker cp pathtoyour.key simpleca:/ca/ca.key
docker cp pathtoyour.cert simpleca:/ca/ca.crt
⁠Define generate parameters

Some certificate creation parameters can be over defined at startup by passing an environment variable:

NameDefaultDescription
NBDAYS90the number of days certificate validity
SIZE2048the private key size
ISSUER_CERT_URLN/AURL of the issuer certificate
CFRthe certificate country
STFrancethe certificate state
LParisthe certificate location
OOrgathe certificate organization
OUUnitthe certificate organization unit

Ex: start the SimpleCA certificate authority with one month certificate validity only:

docker run --detach --name simpleca --volume ca:/ca --publish 80 --env NBDAYS=31 cyd01/simpleca:latest

Tag summary

Content type

Image

Digest

sha256:4b89bb68b…

Size

76.6 MB

Last updated

4 days ago

docker pull cyd01/simpleca