Created
November 15, 2019 19:51
-
-
Save kingbin/c6a1473d8c8ce2f70762bca4a4d2bf8c to your computer and use it in GitHub Desktop.
Docker API exposed from Mac Docker Desktop w TLS
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
export FILENAME=server | |
openssl genrsa -out $FILENAME.key 2048 | |
openssl req -new -key $FILENAME.key -x509 -days 3653 -out $FILENAME.crt | |
cat $FILENAME.key $FILENAME.crt >$FILENAME.pem | |
chmod 600 $FILENAME.key $FILENAME.pem | |
export FILENAME=client | |
openssl genrsa -out $FILENAME.key 2048 | |
openssl req -new -key $FILENAME.key -x509 -days 3653 -out $FILENAME.crt | |
cat $FILENAME.key $FILENAME.crt >$FILENAME.pem | |
chmod 600 $FILENAME.key $FILENAME.pem | |
socat OPENSSL-LISTEN:2376,bind=x.x.x.x,fork,reuseaddr,cert=server.pem,cafile=client.crt UNIX-CLIENT:/var/run/docker.sock | |
** TLS with client verification only ** | |
TLS certificate: client.crt | |
TLS Key: client.key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment