Last active
March 9, 2016 11:50
-
-
Save voodootikigod/72007ebd75660601630e 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 | |
die () { | |
echo >&2 "$@" | |
exit 1 | |
} | |
[ "$#" -eq 1 ] || die "You must provide the DTR FQDN as an argument, $# provided" | |
export DTR_HOST=$1 | |
echo "Configuring Notary for DTR: $DTR_HOST" | |
# fix dev certificates | |
mkdir -p /etc/docker/certs.d/$DTR_HOST | |
openssl s_client -connect $DTR_HOST:443 -showcerts </dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /etc/docker/certs.d/$DTR_HOST/ca.crt | |
cp /etc/docker/certs.d/$DTR_HOST/ca.crt /usr/local/share/ca-certificates/$DTR_HOST.crt | |
update-ca-certificates | |
service docker restart | |
# install notary service | |
git clone https://github.com/docker/notary.git | |
cd notary | |
docker-compose up -d | |
export DOCKER_CONTENT_TRUST=1 | |
docker login $DTR_HOST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment