Created
April 14, 2019 15:29
-
-
Save saurabh-hirani/170f1ea954f0c97679e8aa7b7bd2da7e to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
cn='example.com' | |
host="0.0.0.0" | |
port=8082 | |
openssl genrsa -out /tmp/$cn.key 2048 | |
openssl req -new -x509 -sha256 -key /tmp/$cn.key -out /tmp/$cn.crt -days 3650 \ | |
-subj "/CN=$cn\/emailAddress=admin@$cn/C=US/ST=Ohio/L=Columbus/O=Widgets Inc/OU=Some Unit" | |
docker run --rm -e HTTPS_CERT_FILE='/tmp/example.com.crt' -e HTTPS_KEY_FILE='/tmp/example.com.key' -e PORT=$port -p $port:$port -v /tmp:/tmp mccutchen/go-httpbin:v2.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment