Skip to content

Commit 9c21a3d

Browse files
committed
more speeding up the build
1 parent 6f857bf commit 9c21a3d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
build-args: |
100100
VERSION=v${{ steps.version.outputs.version }}
101101
cache-from: type=gha
102-
cache-to: type=gha,mode=max
102+
cache-to: type=gha
103103

104104
- name: Image info
105105
run: docker manifest inspect docker.io/bigtimber/street-sweep:latest || true

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Install dependencies only when needed
22
FROM node:20-slim AS deps
3-
RUN apt-get update && apt-get install -y libc6-dev && rm -rf /var/lib/apt/lists/*
3+
RUN apt-get update && apt-get install -y --no-install-recommends libc6-dev && rm -rf /var/lib/apt/lists/*
44
WORKDIR /app
55
COPY package.json package-lock.json ./
6-
RUN npm ci
6+
RUN --mount=type=cache,target=/root/.npm npm ci
77

88
# Rebuild the source code only when needed
99
FROM node:20-slim AS builder
1010
WORKDIR /app
1111
COPY --from=deps /app/node_modules ./node_modules
1212
COPY . .
13-
RUN npm run build
13+
RUN --mount=type=cache,target=/app/.next/cache npm run build
1414

1515
# Production image, copy all the files and run next
1616
FROM node:20-slim AS runner

0 commit comments

Comments
 (0)