fix: buildkit warning

This commit is contained in:
hamster1963 2024-10-23 15:23:19 +08:00
parent 7e182ed6eb
commit c5e33b08b6

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM oven/bun:1 as base FROM --platform=$BUILDPLATFORM oven/bun:1 AS base
# Stage 1: Install dependencies # Stage 1: Install dependencies
FROM base AS deps FROM base AS deps
@ -14,7 +14,7 @@ COPY . .
RUN --mount=type=cache,target=/root/.bun bun run build RUN --mount=type=cache,target=/root/.bun bun run build
# Stage 3: Production image # Stage 3: Production image
FROM --platform=$TARGETPLATFORM oven/bun:1-alpine AS runner FROM oven/bun:1-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public