This a docker image useful to generate self-signed certificates
This library is based on minica
View available packages Below is the list of docker images available by PHP versions:
Docker image tags |
---|
ghcr.io/devgine/selfsigned-certificate:latest |
ghcr.io/devgine/selfsigned-certificate:1.0.0 |
This image will create the certificates in the directory /certs
, so to have these certificate in you host machine you need to bind a volume between your target directory and the container directory /certs
.
To generate a certificate for a host domain or a wildcard, use the
-d
option
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -d WWW.YOUR-DOMAIN.COM
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -d *.YOUR-DOMAIN.COM
/!\ EXPERIMENTAL : This feature is not available yet /!\
To generate a certificate for an ip address, use the
-i
option
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 -i IP_ADDRESS
It's also possible to generate multiple certificates in one shot
docker run --rm -v HOST_DIRECTORY:/certs ghcr.io/devgine/selfsigned-certificate:1.0.0 \
-d WWW.YOUR-DOMAIN.COM \
-d *.WILDCARD.COM \
-i IP_ADDRESS
/!\ EXPERIMENTAL : This feature is not available yet /!\
Option | Type | Default | Description |
---|---|---|---|
-ca-cert | string | minica.pem | Root certificate filename, PEM encoded. |
-ca-key | string | minica-key.pem | Root private key filename, PEM encoded. |
openssl x509 -in PATH_TO_YOUR_CERTIFICATE -text -noout