Converting and monitoring multiple certificate-key pairs into PEM and PFX formats.
685
This Docker project is designed to process multiple certificate-key pairs from an input directory, convert them to PEM and PFX formats, and monitor their changes.
.crt and a .key file..crt and .key files to the output directory.fullchain.pem and private.pem) using openssl.docker-cert-converter/
├── Dockerfile
└── entrypoint.sh
entrypoint.shThis script processes multiple certificate-key pairs found in the input directory. Each pair should have the same base name (e.g., site1.crt and site1.key).
The Docker image is based on Alpine Linux and includes necessary tools like openssl, bash, coreutils, and jq.
Navigate to the docker-cert-converter directory and run:
docker build -t cert-converter:latest .
Ensure you have the following directories:
/path/to/certs (contains your certificate-key pairs)/path/to/output (where processed files will be stored)Run the container with:
docker run -d \
--name cert-converter \
-v /path/to/certs:/certs:ro \
-v /path/to/output:/output \
cert-converter:latest
-d: Run the container in detached mode.--name cert-converter: Name the container cert-converter.-v /path/to/certs:/certs:ro: Mount the host's /path/to/certs directory to the container's /certs directory as read-only.-v /path/to/output:/output: Mount the host's /path/to/output directory to the container's /output directory.Check the container logs to verify operations:
docker logs -f cert-converter
To manually trigger the processing script:
docker exec -it cert-converter /bin/sh
# Then execute
/app/entrypoint.sh
site1.crt and site1.key).sleep command for different intervals.Content type
Image
Digest
sha256:b52d5724d…
Size
8 MB
Last updated
over 1 year ago
docker pull bai0012/cert-converter