Update certificates.

This commit is contained in:
Ludovic Fernandez 2017-08-25 09:20:03 +02:00 committed by Traefiker
parent 0d56a98836
commit 87e6285cf6
2 changed files with 942 additions and 1511 deletions

File diff suppressed because it is too large Load diff

22
script/update-cert.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
set -e
CERT_IMAGE="alpine:edge"
# cd to the current directory so the script can be run from anywhere.
cd `dirname $0`
# Update the cert image.
docker pull $CERT_IMAGE
# Fetch the latest certificates.
ID=$(docker run -d $CERT_IMAGE sh -c "apk --update upgrade && apk add ca-certificates && update-ca-certificates")
docker logs -f $ID
docker wait $ID
# Update the local certificates.
docker cp $ID:/etc/ssl/certs/ca-certificates.crt .
# Cleanup.
docker rm -f $ID