Skip to content

Instantly share code, notes, and snippets.

@patriciomg
Created August 26, 2021 10:13
Show Gist options
  • Select an option

  • Save patriciomg/0eebb74536f8d5baf5e1bca06c08a394 to your computer and use it in GitHub Desktop.

Select an option

Save patriciomg/0eebb74536f8d5baf5e1bca06c08a394 to your computer and use it in GitHub Desktop.
Self generated certificates
# https://www.devtech101.com/2017/05/18/gotchas-tips-creating-private-docker-registry-self-signed-certificate/
mkdir -p /docker-data/registry/{data,ssl,config}
docker run --rm -v /docker-data/registry/ssl:/certs \
-e SSL_IP=10.10.10.10 \
-e SSL_DNS=docker.domain.com \
-e SSL_SUBJECTdocker.domain.com \
-e CA_SUBJECT=docker.domain..com \
-e CA_EXPIRE=1095 \
paulczar/omgwtfssl
docker run -v ~/tmp/certs:/certs \
-e SSL_SUBJECT="my-web.docker" \
-e CA_SUBJECT="my-web.docker" \
-e CA_EXPIRE=1095 \
paulczar/omgwtfssl
@patriciomg
Copy link
Author

patriciomg commented Aug 26, 2021

files created:

./ca-key.pem
./key.pem
./cert.pem
./key.csr
./ca.srl
./openssl.cnf
./ca.pem
./secret.yaml

Copy and set
cert.pem as SSLCertificateFile
key.pem as SSLCertificateKeyFile

e.g.:
SSLEngine On
SSLCertificateFile /opt/ssl/cert.pem
SSLCertificateKeyFile /opt/ssl/key.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment