Skip to content

Commit

Permalink
Rollup merge of #90550 - ehuss:update-ca, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Update certificates in some Ubuntu 16 images.

These images use crosstool-ng, which needs to download various things off the internet. The certificate for `www.kernel.org` no longer works with the ca-certificates in Ubuntu 16. This resolves the issue by grabbing from a newer image a certificate bundle from https://curl.se/ca/cacert.pem, which is usually somewhat up to date.
  • Loading branch information
matthiaskrgr committed Dec 8, 2021
2 parents da158c0 + 951dad6 commit c104236
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates
WORKDIR /tmp
RUN curl -f https://curl.se/ca/cacert.pem -o cacert.pem

FROM ubuntu:16.04

# The ca-certificates in ubuntu-16 is too old, so update the certificates
# with something more recent.
COPY --from=0 /tmp/cacert.pem /tmp/cacert.pem
ENV CURL_CA_BUNDLE /tmp/cacert.pem

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

Expand Down
13 changes: 13 additions & 0 deletions src/ci/docker/host-x86_64/dist-arm-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates
WORKDIR /tmp
RUN curl -f https://curl.se/ca/cacert.pem -o cacert.pem

FROM ubuntu:16.04

# The ca-certificates in ubuntu-16 is too old, so update the certificates
# with something more recent.
COPY --from=0 /tmp/cacert.pem /tmp/cacert.pem
ENV CURL_CA_BUNDLE /tmp/cacert.pem

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

Expand Down
13 changes: 13 additions & 0 deletions src/ci/docker/host-x86_64/dist-armhf-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates
WORKDIR /tmp
RUN curl -f https://curl.se/ca/cacert.pem -o cacert.pem

FROM ubuntu:16.04

# The ca-certificates in ubuntu-16 is too old, so update the certificates
# with something more recent.
COPY --from=0 /tmp/cacert.pem /tmp/cacert.pem
ENV CURL_CA_BUNDLE /tmp/cacert.pem

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

Expand Down
13 changes: 13 additions & 0 deletions src/ci/docker/host-x86_64/dist-armv7-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates
WORKDIR /tmp
RUN curl -f https://curl.se/ca/cacert.pem -o cacert.pem

FROM ubuntu:16.04

# The ca-certificates in ubuntu-16 is too old, so update the certificates
# with something more recent.
COPY --from=0 /tmp/cacert.pem /tmp/cacert.pem
ENV CURL_CA_BUNDLE /tmp/cacert.pem

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh

Expand Down

0 comments on commit c104236

Please sign in to comment.