diff --git a/Dockerfile b/Dockerfile index b2d4971345..3467359ac4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 # diff --git a/Dockerfile.compute-tools b/Dockerfile.compute-tools index dc67ae3032..c2e33b9d98 100644 --- a/Dockerfile.compute-tools +++ b/Dockerfile.compute-tools @@ -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