mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-07 05:22:56 +00:00
* Update cachepot endpoint * Update dockerfile & remove env * Update image building process * Cannot use metadata endpoint for this * Update workflow * Conform to kaniko syntax * Update syntax * Update approach * Update dockerfiles * Force update * Update dockerfiles * Update dockerfile * Cleanup dockerfiles * Update s3 test location * Revert s3 experiment * Add more debug * Specify aws region * Remove debug, add prefix * Remove one more debug Co-authored-by: Rory de Zoete <rdezoete@RorysMacStudio.fritz.box>
26 lines
983 B
Docker
26 lines
983 B
Docker
# First transient image to build compute_tools binaries
|
|
# NB: keep in sync with rust image version in .github/workflows/build_and_test.yml
|
|
FROM 369495373322.dkr.ecr.eu-central-1.amazonaws.com/rust:pinned AS rust-build
|
|
WORKDIR /home/nonroot
|
|
|
|
# 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
|
|
ENV AWS_REGION=eu-central-1
|
|
ENV CACHEPOT_S3_KEY_PREFIX=cachepot
|
|
ARG CACHEPOT_BUCKET=neon-github-dev
|
|
#ARG AWS_ACCESS_KEY_ID
|
|
#ARG AWS_SECRET_ACCESS_KEY
|
|
|
|
COPY . .
|
|
|
|
RUN set -e \
|
|
&& mold -run cargo build -p compute_tools --release \
|
|
&& cachepot -s
|
|
|
|
# Final image that only has one binary
|
|
FROM debian:bullseye-slim
|
|
|
|
COPY --from=rust-build /home/nonroot/target/release/compute_ctl /usr/local/bin/compute_ctl
|