Skip to content

Aim to generate self-signed mTLS certificates for both server and client with one click

Notifications You must be signed in to change notification settings

oscarzhou/gentls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A docker image used to generate self-signed mTLS CA, Server and Client Certificates.

Supported platforms

  • linux/amd64
  • linux/arm64

How to use?

  1. Mount your local directory to /data in the container.
  2. Set the CN environment variable to your domain or ip address. If you use for localhost, you can set CN to your private ip address. If you use for your domain, you can set CN to your domain. If you want to add multiple domains, you can use comma to separate them.
  3. Run the container.
  4. 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

Available ENV

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

Thanks

The TLS certificate and key files are generated by cfssl

About

Aim to generate self-signed mTLS certificates for both server and client with one click

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published