fix(docker): remove BuildKit mount options for compatibility
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
ZhenYi 2026-04-15 00:28:38 +08:00
parent 4b4361072d
commit 09dda115b4
7 changed files with 7 additions and 30 deletions

View File

@ -21,10 +21,7 @@ COPY apps/ apps/
RUN cargo fetch
# Build the binary
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package app --target ${TARGET}
RUN cargo build --release --package app --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim AS runtime

View File

@ -16,11 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package email-server --target ${TARGET}
RUN cargo build --release --package email-server --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,11 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package git-hook --target ${TARGET}
RUN cargo build --release --package git-hook --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,11 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package gitserver --target ${TARGET}
RUN cargo build --release --package gitserver --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim AS runtime

View File

@ -16,11 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package migrate-cli --target ${TARGET}
RUN cargo build --release --package migrate-cli --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -16,11 +16,7 @@ COPY libs/ libs/
COPY apps/ apps/
RUN cargo fetch
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=target \
cargo build --release --package operator --target ${TARGET}
RUN cargo build --release --package operator --target ${TARGET}
# ---- Stage 2: Runtime ----
FROM debian:bookworm-slim

View File

@ -46,7 +46,7 @@ for (const service of targets) {
try {
execSync(
`DOCKER_BUILDKIT=1 docker build ` +
`docker build ` +
`--build-arg BUILD_TARGET=${BUILD_TARGET} ` +
`-f "${dockerfile}" ` +
`-t "${image}" ` +