Skip to content

Commit

Permalink
🐳docker: use bind mount (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukome0743 authored Oct 16, 2024
1 parent 7c1c87f commit f5b40cb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# syntax=docker.io/docker/dockerfile-upstream:1.11.0-rc1-labs
FROM oven/bun:canary AS base
FROM oven/bun:canary AS builder
WORKDIR /usr/src/app

FROM base AS deps
COPY package.json bun.lockb ./
RUN bun i --frozen-lockfile

FROM base AS builder
COPY --from=deps /usr/src/app/node_modules ./node_modules
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=bun.lockb,target=bun.lockb \
--mount=type=cache,target=/root/.bun \
bun i --frozen-lockfile
COPY . .
RUN bun test
RUN bun run build
Expand Down

0 comments on commit f5b40cb

Please sign in to comment.