From cc680dd81c4d7be96916811fc4de1f859703a0b9 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 20 Jul 2022 15:06:38 +0300 Subject: [PATCH] Explicitly enable cachepot in Docker builds only --- Dockerfile | 4 ++++ Dockerfile.compute-tools | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index ad85638af3..6f017ac5d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,10 @@ RUN set -e \ FROM neondatabase/rust:1.58 AS build ARG GIT_VERSION=local +# Enable https://github.com/paritytech/cachepot to cache Rust crates' compilation results in Docker builds. +# Set up cachepot to use an AWS S3 bucket for cache results, to reuse it between `docker build` invocations. +# cachepot falls back to local filesystem if S3 is misconfigured, not failing the build. +ARG RUSTC_WRAPPER=cachepot ARG CACHEPOT_BUCKET=zenith-rust-cachepot ARG AWS_ACCESS_KEY_ID ARG AWS_SECRET_ACCESS_KEY diff --git a/Dockerfile.compute-tools b/Dockerfile.compute-tools index 71770ae9ed..87b73e139c 100644 --- a/Dockerfile.compute-tools +++ b/Dockerfile.compute-tools @@ -2,6 +2,10 @@ # NB: keep in sync with rust image version in .circle/config.yml FROM neondatabase/rust:1.58 AS rust-build +# Enable https://github.com/paritytech/cachepot to cache Rust crates' compilation results in Docker builds. +# Set up cachepot to use an AWS S3 bucket for cache results, to reuse it between `docker build` invocations. +# cachepot falls back to local filesystem if S3 is misconfigured, not failing the build. +ARG RUSTC_WRAPPER=cachepot ARG CACHEPOT_BUCKET=zenith-rust-cachepot ARG AWS_ACCESS_KEY_ID ARG AWS_SECRET_ACCESS_KEY