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