A docker image used to generate self-signed mTLS CA, Server and Client Certificates.
- linux/amd64
- linux/arm64
- Mount your local directory to
/data
in the container. - Set the
CN
environment variable to your domain or ip address. If you use for localhost, you can setCN
to your private ip address. If you use for your domain, you can setCN
to your domain. If you want to add multiple domains, you can use comma to separate them. - Run the container.
- The certificates and key files will be generated in the mounted directory.
mkdir -p certs
docker run -v $(pwd)/certs:/data -e CN="example.com,182.12.23.144" --name gentls oscarzhou/gentls:latest
If you want to add certificate for your localhsot domain, you can use the following ENVs:
-e CN="192.168.0.10" # your private ip address
If you want to add certificate for your domain, you can use the following ENVs:
-e CN="example.com" # your domain
If you want to add multiple domains, you can use the following ENVs:
-e CN="example.com,example2.com" # multiple domains
The TLS certificate and key files are generated by cfssl