soulteary/certs-maker

By soulteary

Updated about 1 year ago

Tiny self-signed tool, ~ 3MB Size. Generate a self-hosted / dev certificate through configuration.

Image
6

10K+

soulteary/certs-maker repository overview

Certs Maker

Tiny self-signed tool, ~ 3MB Size.

Generate a self-hosted / dev certificate through configuration.

Quick Start

Generate self-signed certificate supporting *.lab.com and *.data.lab.com, just "One Click":

docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com"
# OR use environment:
# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" soulteary/certs-maker

Check in the ssl directory of the execution command directory:

ssl
├── lab.com.conf
├── lab.com.crt
└── lab.com.key

If you prefer to use file configuration, you can use docker-compose.yml like this:

version: '2'
services:

certs-maker:
    image: soulteary/certs-maker
    environment:
      - CERT_DNS=lab.com,*.lab.com,*.data.lab.com
    volumes:
      - ./ssl:/ssl

Then execute the following command:

docker-compose up
# OR
# docker compose up

If you want the certificate to be more friendly to K8s, you can add the FOR_K8S parameter:

docker run --rm -it -v `pwd`/ssl:/ssl soulteary/certs-maker "--CERT_DNS=lab.com,*.lab.com,*.data.lab.com --FOR_K8S=ON"
# OR
# docker run --rm -it -v `pwd`/ssl:/ssl -e "CERT_DNS=lab.com,*.lab.com,*.data.lab.com" -e "FOR_K8S=ON" soulteary/certs-maker

And K8S friendly compose file:

version: '2'
services:

certs-maker:
    image: soulteary/certs-maker
    environment:
      - CERT_DNS=lab.com,*.lab.com,*.data.lab.com
      - FOR_K8S=ON
    volumes:
      - ./ssl:/ssl

If you want to further define the information content of the certificate, including the issuing country, province, street, organization name, etc., you can refer to the following document to manually add parameters.

SSL certificate parameters

You can customize the generated certificate by declaring the environment variables or cli args of docker.

Use in environment variables:

ParameterNameUse in environment variables
Country NameCERT_CCERT_C=CN
State Or Province NameCERT_STCERT_ST=BJ
Locality NameCERT_LCERT_L=HD
Organization NameCERT_OCERT_O=Lab
Organizational Unit NameCERT_OUCERT_OU=Dev
Common NameCERT_CNCERT_CN=Hello World
DomiansCERT_DNSCERT_DNS=lab.com,*.lab.com,*.data.lab.com
Issue for K8sFOR_K8SFOR_K8S=ON

Use in Program CLI arguments:

ParameterNameUse in CLI arguments
Country NameCERT_C--CERT_C=CN
State Or Province NameCERT_ST--CERT_ST=BJ
Locality NameCERT_L--CERT_L=HD
Organization NameCERT_O--CERT_O=Lab
Organizational Unit NameCERT_OU--CERT_OU=Dev
Common NameCERT_CN--CERT_CN=Hello World
DomiansCERT_DNS--CERT_DNS=lab.com,*.lab.com,*.data.lab.com
Issue for K8sFOR_K8S--FOR_K8S=ON

Docker Image

soulteary/certs-maker

Tag summary

Content type

Image

Digest

sha256:7b266791e

Size

5.4 MB

Last updated

about 1 year ago

docker pull soulteary/certs-maker