|
2 | 2 | FROM rust:slim@sha256:3f391b0678a6e0c88fd26f13e399c9c515ac47354e3cadfee7daee3b21651a4f AS rust-utils
|
3 | 3 | # Install rust helper programs
|
4 | 4 | ENV CARGO_INSTALL_ROOT=/tmp/
|
5 |
| -RUN apt-get update |
6 |
| -RUN apt-get install -y libssl-dev openssl pkg-config build-essential |
| 5 | +# Use more reliable mirrors for Debian packages |
| 6 | +RUN sed -i 's|http://deb.debian.org/debian|http://mirrors.edge.kernel.org/debian|g' /etc/apt/sources.list && \ |
| 7 | + apt-get update || true |
| 8 | +RUN apt-get update && apt-get install -y libssl-dev openssl pkg-config build-essential |
7 | 9 | RUN cargo install jj-cli typos-cli watchexec-cli
|
8 | 10 |
|
9 | 11 | FROM ubuntu:jammy@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97 AS go
|
@@ -119,7 +121,10 @@ RUN mkdir -p /etc/sudoers.d && \
|
119 | 121 | chmod 750 /etc/sudoers.d/ && \
|
120 | 122 | chmod 640 /etc/sudoers.d/nopasswd
|
121 | 123 |
|
122 |
| -RUN apt-get update --quiet && apt-get install --yes \ |
| 124 | +# Use more reliable mirrors for Ubuntu packages |
| 125 | +RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && \ |
| 126 | + sed -i 's|http://security.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && \ |
| 127 | + apt-get update --quiet && apt-get install --yes \ |
123 | 128 | ansible \
|
124 | 129 | apt-transport-https \
|
125 | 130 | apt-utils \
|
@@ -334,11 +339,15 @@ RUN curl --silent --show-error --location --output /usr/local/bin/cloud_sql_prox
|
334 | 339 | curl --silent --show-error --location --output /usr/local/bin/cosign "https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign-linux-amd64" && \
|
335 | 340 | chmod a=rx /usr/local/bin/cosign && \
|
336 | 341 | # Install Bun JavaScript runtime to /usr/local/bin
|
| 342 | + # Ensure unzip is installed right before using it and use multiple mirrors for reliability |
| 343 | + (apt-get update || (sed -i 's|http://archive.ubuntu.com/ubuntu/|http://mirrors.edge.kernel.org/ubuntu/|g' /etc/apt/sources.list && apt-get update)) && \ |
| 344 | + apt-get install -y unzip && \ |
337 | 345 | curl --silent --show-error --location --fail "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" --output /tmp/bun.zip && \
|
338 | 346 | unzip -q /tmp/bun.zip -d /tmp && \
|
339 | 347 | mv /tmp/bun-linux-x64/bun /usr/local/bin/ && \
|
340 | 348 | chmod a=rx /usr/local/bin/bun && \
|
341 |
| - rm -rf /tmp/bun.zip /tmp/bun-linux-x64 |
| 349 | + rm -rf /tmp/bun.zip /tmp/bun-linux-x64 && \ |
| 350 | + apt-get clean && rm -rf /var/lib/apt/lists/* |
342 | 351 |
|
343 | 352 | # We use yq during "make deploy" to manually substitute out fields in
|
344 | 353 | # our helm values.yaml file. See https://github.com/helm/helm/issues/3141
|
|
0 commit comments