Forked from PieterScheffers/start_docker_registry.bash
Created
March 25, 2017 04:36
-
-
Save ma0c/ccde47b8e92bc42d0f7aaec48f455a33 to your computer and use it in GitHub Desktop.
Revisions
-
PieterScheffers revised this gist
Jun 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ # Generate SSL certificate for domain /opt/letsencrypt/letsencrypt-auto certonly --keep-until-expiring --standalone -d domain.example.com --email [email protected] # Setup letsencrypt certificates renewing line="30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/letsencrypt-renew.log" (crontab -u root -l; echo "$line" ) | crontab -u root - -
PieterScheffers revised this gist
Jun 19, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ /opt/letsencrypt/letsencrypt-auto certonly --keep-until-expiring --standalone -d domain.example.com --email [email protected] # Renew letsencrypt certificates line="30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/letsencrypt-renew.log" (crontab -u root -l; echo "$line" ) | crontab -u root - # Rename SSL certificates -
PieterScheffers revised this gist
Jun 19, 2016 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,13 @@ # install letsencrypt # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 # Generate SSL certificate for domain /opt/letsencrypt/letsencrypt-auto certonly --keep-until-expiring --standalone -d domain.example.com --email [email protected] # Renew letsencrypt certificates line="30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log" (crontab -u root -l; echo "$line" ) | crontab -u root - # Rename SSL certificates # https://community.letsencrypt.org/t/how-to-get-crt-and-key-files-from-i-just-have-pem-files/7348 cd /etc/letsencrypt/live/domain.example.com/ -
PieterScheffers revised this gist
Jun 19, 2016 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,7 @@ docker run -d -p 5000:5000 --restart=always --name registry \ -v /opt/docker-registry:/var/lib/registry \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ registry:2 # List images # https://domain.example.com/v2/_catalog -
PieterScheffers revised this gist
Jun 19, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ #!/usr/bin/env bash # install docker # https://docs.docker.com/engine/installation/linux/ubuntulinux/ # install docker-compose # https://docs.docker.com/compose/install/ # install letsencrypt # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 -
PieterScheffers created this gist
Jun 19, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/usr/bin/env bash # install letsencrypt # https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 # Rename SSL certificates # https://community.letsencrypt.org/t/how-to-get-crt-and-key-files-from-i-just-have-pem-files/7348 cd /etc/letsencrypt/live/domain.example.com/ cp privkey.pem domain.key cat cert.pem chain.pem > domain.crt chmod 777 domain.crt chmod 777 domain.key # https://docs.docker.com/registry/deploying/ docker run -d -p 5000:5000 --restart=always --name registry \ -v /etc/letsencrypt/live/domain.example.com:/certs \ -v /opt/docker-registry:/var/lib/registry \ -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ registry:2