perf(docker): use all CPU cores for parallel compilation
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
ZhenYi 2026-04-15 00:29:53 +08:00
parent 09dda115b4
commit f7107766cd
6 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ COPY apps/ apps/
RUN cargo fetch
# Build the binary
RUN cargo build --release --package app --target ${TARGET}
RUN cargo build --release --package app --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim AS runtime

View File

@ -16,7 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN cargo build --release --package email-server --target ${TARGET}
RUN cargo build --release --package email-server --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,7 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN cargo build --release --package git-hook --target ${TARGET}
RUN cargo build --release --package git-hook --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,7 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN cargo build --release --package gitserver --target ${TARGET}
RUN cargo build --release --package gitserver --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim AS runtime

View File

@ -16,7 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN cargo build --release --package migrate-cli --target ${TARGET}
RUN cargo build --release --package migrate-cli --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,7 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN cargo build --release --package operator --target ${TARGET}
RUN cargo build --release --package operator --target ${TARGET} -j $(nproc)
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim