fix(docker): remove BuildKit mount options for compatibility
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
4b4361072d
commit
09dda115b4
@ -21,10 +21,7 @@ COPY apps/ apps/
|
|||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
|
||||||
# Build the binary
|
# Build the binary
|
||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
RUN cargo build --release --package app --target ${TARGET}
|
||||||
--mount=type=cache,target=/usr/local/cargo/git \
|
|
||||||
--mount=type=cache,target=target \
|
|
||||||
cargo build --release --package app --target ${TARGET}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim AS runtime
|
FROM debian:bookworm-slim AS runtime
|
||||||
|
|||||||
@ -16,11 +16,7 @@ COPY libs/ libs/
|
|||||||
COPY apps/ apps/
|
COPY apps/ apps/
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
RUN cargo build --release --package email-server --target ${TARGET}
|
||||||
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}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
@ -16,11 +16,7 @@ COPY libs/ libs/
|
|||||||
COPY apps/ apps/
|
COPY apps/ apps/
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
RUN cargo build --release --package git-hook --target ${TARGET}
|
||||||
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}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
@ -16,11 +16,7 @@ COPY libs/ libs/
|
|||||||
COPY apps/ apps/
|
COPY apps/ apps/
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
RUN cargo build --release --package gitserver --target ${TARGET}
|
||||||
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}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim AS runtime
|
FROM debian:bookworm-slim AS runtime
|
||||||
|
|||||||
@ -16,11 +16,7 @@ COPY libs/ libs/
|
|||||||
COPY apps/ apps/
|
COPY apps/ apps/
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
RUN cargo build --release --package migrate-cli --target ${TARGET}
|
||||||
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}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
@ -16,11 +16,7 @@ COPY libs/ libs/
|
|||||||
COPY apps/ apps/
|
COPY apps/ apps/
|
||||||
|
|
||||||
RUN cargo fetch
|
RUN cargo fetch
|
||||||
|
RUN cargo build --release --package operator --target ${TARGET}
|
||||||
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}
|
|
||||||
|
|
||||||
# ---- Stage 2: Runtime ----
|
# ---- Stage 2: Runtime ----
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|||||||
@ -46,7 +46,7 @@ for (const service of targets) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
execSync(
|
execSync(
|
||||||
`DOCKER_BUILDKIT=1 docker build ` +
|
`docker build ` +
|
||||||
`--build-arg BUILD_TARGET=${BUILD_TARGET} ` +
|
`--build-arg BUILD_TARGET=${BUILD_TARGET} ` +
|
||||||
`-f "${dockerfile}" ` +
|
`-f "${dockerfile}" ` +
|
||||||
`-t "${image}" ` +
|
`-t "${image}" ` +
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user