mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 20:42:54 +00:00
Lock cargo dependencies during CI builds
This commit is contained in:
committed by
Kirill Bulatov
parent
a5ca6a9d2b
commit
a56ae15edf
@@ -69,9 +69,9 @@ RUN make -j $(getconf _NPROCESSORS_ONLN) \
|
||||
# Compile and run the Neon-specific `compute_ctl` binary
|
||||
FROM 369495373322.dkr.ecr.eu-central-1.amazonaws.com/rust:$TAG AS compute-tools
|
||||
USER nonroot
|
||||
COPY --chown=nonroot compute_tools compute_tools
|
||||
COPY --chown=nonroot workspace_hack workspace_hack
|
||||
RUN cd compute_tools && cargo build --release
|
||||
# Copy entire project to get Cargo.* files with proper dependencies for the whole project
|
||||
COPY --chown=nonroot . .
|
||||
RUN cd compute_tools && cargo build --locked --release
|
||||
|
||||
# Put it all together into the final image
|
||||
FROM debian:bullseye-slim
|
||||
@@ -86,7 +86,7 @@ RUN mkdir /var/db && useradd -m -d /var/db/postgres postgres && \
|
||||
# TODO: Check if we can make the extension setup more modular versus a linear build
|
||||
# currently plv8-build copies the output /usr/local/pgsql from postgis-build, etc#
|
||||
COPY --from=neon-pg-ext-build --chown=postgres /usr/local/pgsql /usr/local
|
||||
COPY --from=compute-tools --chown=postgres /home/nonroot/compute_tools/target/release/compute_ctl /usr/local/bin/compute_ctl
|
||||
COPY --from=compute-tools --chown=postgres /home/nonroot/target/release/compute_ctl /usr/local/bin/compute_ctl
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y libreadline-dev libossp-uuid-dev gdal-bin libgdal-dev libprotobuf-c-dev && \
|
||||
@@ -103,4 +103,4 @@ RUN echo "deb http://ftp.debian.org/debian testing main" >> /etc/apt/sources.lis
|
||||
RUN ln -s /usr/local/bin/compute_ctl /usr/local/bin/zenith_ctl
|
||||
|
||||
USER postgres
|
||||
ENTRYPOINT ["/usr/local/bin/compute_ctl"]
|
||||
ENTRYPOINT ["/usr/local/bin/compute_ctl"]
|
||||
|
||||
Reference in New Issue
Block a user