mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-04 05:50:38 +00:00
Use mold in Docker images
This commit is contained in:
committed by
Kirill Bulatov
parent
787f0d33f0
commit
3136a0754a
@@ -9,7 +9,7 @@ COPY Makefile Makefile
|
||||
|
||||
ENV BUILD_TYPE release
|
||||
RUN set -e \
|
||||
&& make -j $(nproc) -s postgres \
|
||||
&& mold -run make -j $(nproc) -s postgres \
|
||||
&& rm -rf tmp_install/build \
|
||||
&& tar -C tmp_install -czf /postgres_install.tar.gz .
|
||||
|
||||
@@ -26,7 +26,7 @@ COPY . .
|
||||
|
||||
# Show build caching stats to check if it was used in the end.
|
||||
# Has to be the part of the same RUN since cachepot daemon is killed in the end of this RUN, loosing the compilation stats.
|
||||
RUN cargo build --release && cachepot -s
|
||||
RUN mold -run cargo build --release && cachepot -s
|
||||
|
||||
# Build final image
|
||||
#
|
||||
|
||||
@@ -8,7 +8,7 @@ ARG AWS_SECRET_ACCESS_KEY
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build -p compute_tools --release && cachepot -s
|
||||
RUN mold -run cargo build -p compute_tools --release && cachepot -s
|
||||
|
||||
# Final image that only has one binary
|
||||
FROM debian:buster-slim
|
||||
|
||||
Reference in New Issue
Block a user