Created
January 26, 2021 09:05
-
-
Save giper45/b27c7a23a56132e5b06cac81bb35daed to your computer and use it in GitHub Desktop.
openssl-nginx-generation.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYDOMAIN=secsi.com | |
docker run -it --rm -d --name openssl alpine/openssl | |
docker exec -it openssl openssl req -x509 -nodes -days 365 -subj "/C=CA/ST=QC/O=Company, Inc./CN=$MYDOMAIN" -addext "subjectAltName=DNS:$MYDOMAIN" -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt; | |
docker cp openssl:/etc/ssl ssl-output | |
docker rm -f openssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment