https://github.com/willfarrell/docker-selfsigncert
Docker for creating self signed tls certificates
https://github.com/willfarrell/docker-selfsigncert
Last synced: about 1 year ago
JSON representation
Docker for creating self signed tls certificates
- Host: GitHub
- URL: https://github.com/willfarrell/docker-selfsigncert
- Owner: willfarrell
- License: mit
- Created: 2018-07-09T02:54:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-09T18:23:12.000Z (over 7 years ago)
- Last Synced: 2025-01-19T13:27:24.069Z (about 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker: Self-Signed Certificates
Container to easily inject self-signed certs into other docker containers via volumes
## Features
- Creates separate CA using RSA or ECDSA
- Creates certificates using RSA and ECDSA
- Saves certificate and keys in volumes
- Will only renew during specified time period
- Verifies certificates
## ENV
```bash
# See source code for full list
CA_ALG: RSA, ECDSA
CA_SIZE: 2048, 4096 for RSA and secp384r1, and others for ECDSA
CA_SUBJECT: Organization name
CA_EXPIRE: How many days till expire
CA_RENEW: How many days before expire to try to renew
SSL_ALG: See CA_ALG
SSL_SIZE: See CA_SIZE
SSL_EXPIRE: See CA_EXPIRE
SSL_RENEW: See CA_RENEW
SSL_SUBJECT: Primary domain to generate cert for
SSL_DNS: Secondary domains to add on the certificate
SSL_IP: Secondary IPs to add on the certificate
```
## Use
### docker cli
```bash
docker run \
-e CA_SUBJECT="Farrell Labs Inc" \
-e SSL_SUBJECT=app.example.com \
willfarrell/selfsigncert
```
### docker-compose.yml
```yml
version: "3"
services:
selfsigncert:
image: willfarrell/selfsigncert
environment:
- CA_SUBJECT="Farrell Labs Inc"
- SSL_SUBJECT=app.example.com
volumes:
- "tls_ca:/etc/ssl/ca"
- "tls_certs:/etc/ssl/certs"
volumes:
tls_ca:
tls_certs:
```
## Credit:
https://github.com/paulczar/omgwtfssl