29 lines
910 B
Bash
Executable File
29 lines
910 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
DESTDIR=/usr/local/share/ca-certificates
|
|
UPDATE_CERTS_CMD=update-ca-certificates
|
|
CERTS="$(cat <<EOF
|
|
https://letsencrypt.org/certs/isrgrootx1.pem
|
|
https://letsencrypt.org/certs/isrg-root-x2.pem
|
|
https://letsencrypt.org/certs/lets-encrypt-r3.pem
|
|
https://letsencrypt.org/certs/lets-encrypt-e1.pem
|
|
https://letsencrypt.org/certs/lets-encrypt-r4.pem
|
|
https://letsencrypt.org/certs/lets-encrypt-e2.pem
|
|
EOF
|
|
)"
|
|
|
|
|
|
echo "ENV DEBIAN_FRONTEND=noninteractive" >> Dockerfile
|
|
echo "RUN apt-get update && apt-get install --yes --no-install-recommends openssl ca-certificates" >> Dockerfile
|
|
|
|
for cert in $CERTS; do
|
|
filename=$(basename "$cert")
|
|
echo "ADD $cert $DESTDIR/$filename" >> Dockerfile
|
|
echo "RUN openssl x509 -in '$DESTDIR/$filename' -inform PEM -out '$DESTDIR/$filename.crt'" >> Dockerfile
|
|
done
|
|
|
|
echo "RUN $UPDATE_CERTS_CMD" >> Dockerfile
|
|
echo "ENV DEBIAN_FRONTEND=" >> Dockerfile
|