manibuilder/alpine: Fix SSL cert issues

Once more, try to find a way to build all the containers. They enabled a
redirection from http to https recently and there is no option to skip
certificate checks. So the only move is to provide a current CA certifi-
cate by ourselves. Note, the added certificate is the current Root CA
of Let's Encrypt. Due to issues with the ca-certificates packages in
Alpine v3.7, nothing using another Root CA will work this way.

Change-Id: I3bb340428b863ea5e24ad6e1da6f3fe428eb187d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/73402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/util/manibuilder/Dockerfile.alpine b/util/manibuilder/Dockerfile.alpine
index 7f738e1..09a3d6a 100644
--- a/util/manibuilder/Dockerfile.alpine
+++ b/util/manibuilder/Dockerfile.alpine
@@ -1,12 +1,16 @@
 FROM manibase
 
-ARG PROTO=https
+COPY isrgrootx1.pem /etc/ssl/cert.pem
+
 RUN \
 	adduser -D mani mani && \
-	sed -i "s/https/${PROTO}/" /etc/apk/repositories && \
 	apk update && \
-	apk add ca-certificates build-base linux-headers git ccache \
+	apk add build-base linux-headers git ccache \
 		pciutils-dev libusb-compat-dev libusb-dev
+	if [ ! -h /etc/ssl/cert.pem ]; then \
+		rm -f /etc/ssl/certs/*; \
+		ln -sf /etc/ssl/cert.pem /etc/ssl/certs/ca-certificates.crt; \
+	fi
 
 RUN apk add libgpiod-dev || true