Skip to content

Commit b2cd902

Browse files
authored
KNOX-3264 - One more go at fixing docker (#1164)
1 parent ca145f6 commit b2cd902

File tree

1 file changed

+9
-10
lines changed
  • gateway-docker/src/main/resources/docker

1 file changed

+9
-10
lines changed

gateway-docker/src/main/resources/docker/Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,15 @@ ARG ENTRYPOINT
5757
COPY ${ENTRYPOINT} /home/knox/knox/entrypoint.sh
5858
RUN chmod +x /home/knox/knox/entrypoint.sh
5959

60-
# Add the Amazon Root CA certificates
61-
RUN mkdir /home/knox/cacrts
62-
ADD --chown=knox:knox \
63-
https://www.amazontrust.com/repository/AmazonRootCA1.cer \
64-
https://www.amazontrust.com/repository/AmazonRootCA2.cer \
65-
https://www.amazontrust.com/repository/AmazonRootCA3.cer \
66-
https://www.amazontrust.com/repository/AmazonRootCA4.cer \
67-
https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem \
68-
https://letsencrypt.org/certs/isrgrootx1.pem \
69-
https://letsencrypt.org/certs/isrg-root-x2.pem /home/knox/cacrts/
60+
# Add the Amazon Root CA and Let's Encrypt production certificates (best-effort)
61+
RUN mkdir /home/knox/cacrts && \
62+
curl -sSLo /home/knox/cacrts/AmazonRootCA1.cer https://www.amazontrust.com/repository/AmazonRootCA1.cer || true && \
63+
curl -sSLo /home/knox/cacrts/AmazonRootCA2.cer https://www.amazontrust.com/repository/AmazonRootCA2.cer || true && \
64+
curl -sSLo /home/knox/cacrts/AmazonRootCA3.cer https://www.amazontrust.com/repository/AmazonRootCA3.cer || true && \
65+
curl -sSLo /home/knox/cacrts/AmazonRootCA4.cer https://www.amazontrust.com/repository/AmazonRootCA4.cer || true && \
66+
curl -sSLo /home/knox/cacrts/isrgrootx1.pem https://letsencrypt.org/certs/isrgrootx1.pem || true && \
67+
curl -sSLo /home/knox/cacrts/isrg-root-x2.pem https://letsencrypt.org/certs/isrg-root-x2.pem || true && \
68+
chown -R knox:knox /home/knox/cacrts
7069

7170
WORKDIR /home/knox/knox
7271

0 commit comments

Comments
 (0)