Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker] use cloudfront debian mirrors for bullseye #15303

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/builder/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
FROM rust as rust-base
WORKDIR /aptos

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
sed -i 's|http://deb.debian.org/debian|http://cloudfront.debian.net/debian|g' /etc/apt/sources.list && \
apt update && apt-get --no-install-recommends install -y \
cmake \
curl \
Expand Down
9 changes: 8 additions & 1 deletion docker/builder/debian-base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ ARG TARGETARCH

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
sed -i 's|http://deb.debian.org/debian|http://cloudfront.debian.net/debian|g' /etc/apt/sources.list && \
apt-get update && apt-get --no-install-recommends --allow-downgrades -y \
install \
ca-certificates
rustielin marked this conversation as resolved.
Show resolved Hide resolved

# Add Tini to make sure the binaries receive proper SIGTERM signals when Docker is shut down
ADD --chmod=755 https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH /tini
ENTRYPOINT ["/tini", "--"]
ENTRYPOINT ["/tini", "--"]
4 changes: 4 additions & 0 deletions docker/builder/faucet.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
### Faucet Image ###
FROM debian-base AS faucet

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
sed -i 's|http://security.debian.org/debian-security|https://cloudfront.debian.net/debian-security|g' /etc/apt/sources.list && \
apt-get update && apt-get --no-install-recommends install -y \
libssl1.1 \
ca-certificates \
Expand Down
5 changes: 4 additions & 1 deletion docker/builder/forge.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

FROM debian-base as forge

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand Down
5 changes: 4 additions & 1 deletion docker/builder/indexer-grpc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

FROM debian-base AS indexer-grpc

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/keyless-pepper-service.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian-base AS keyless-pepper-service

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/nft-metadata-crawler.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM indexer-builder
FROM debian-base AS nft-metadata-crawler

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand Down
7 changes: 5 additions & 2 deletions docker/builder/node-checker.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

FROM debian-base AS node-checker

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand All @@ -25,4 +28,4 @@ ENV GIT_TAG ${GIT_TAG}
ARG GIT_BRANCH
ENV GIT_BRANCH ${GIT_BRANCH}
ARG GIT_SHA
ENV GIT_SHA ${GIT_SHA}
ENV GIT_SHA ${GIT_SHA}
7 changes: 5 additions & 2 deletions docker/builder/telemetry-service.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM debian-base AS telemetry-service

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand All @@ -23,4 +26,4 @@ ENV GIT_TAG ${GIT_TAG}
ARG GIT_BRANCH
ENV GIT_BRANCH ${GIT_BRANCH}
ARG GIT_SHA
ENV GIT_SHA ${GIT_SHA}
ENV GIT_SHA ${GIT_SHA}
3 changes: 0 additions & 3 deletions docker/builder/tools.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
### Tools Image ###
FROM debian-base AS tools

RUN echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list && \
echo "Package: *\nPin: release n=bullseye\nPin-Priority: 50" > /etc/apt/preferences.d/bullseye

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get --no-install-recommends --allow-downgrades -y \
Expand Down
3 changes: 3 additions & 0 deletions docker/builder/validator-testing.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

FROM debian-base as validator-testing-base

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends \
Expand Down
5 changes: 4 additions & 1 deletion docker/builder/validator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ FROM tools-builder

FROM debian-base AS validator

# Current debian base used in build is bullseye, pin to prevent unexpected changes


RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install --no-install-recommends -y \
libssl1.1 \
ca-certificates \
Expand Down
Loading