Skip to content

Commit 4589178

Browse files
committed
๐Ÿฉน Docker ๋นŒ๋“œ ์‹œ cache ์‚ฌ์šฉ ํ•ด์ œ
1 parent ec740d0 commit 4589178

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

โ€Ž.github/workflows/upload_docker_image_to_acr.ymlโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
push: true # ๋นŒ๋“œ ํ›„ ํ‘ธ์‹œ ์‹คํ–‰
5353
tags: ${{ steps.meta.outputs.tags }} # ์œ„ metadata step์—์„œ ์ƒ์„ฑ๋œ ํƒœ๊ทธ ์‚ฌ์šฉ
5454
labels: ${{ steps.meta.outputs.labels }} # ์œ„ metadata step์—์„œ ์ƒ์„ฑ๋œ ๋ผ๋ฒจ ์‚ฌ์šฉ
55+
build-args: |
56+
CACHEBUST=${{ github.sha }}
5557
5658
# 6. ACR์— ํ‘ธ์‹œ๋œ ์ด๋ฏธ์ง€ ํ™•์ธ
5759
- name: Verify pushed image

โ€ŽDockerfileโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ WORKDIR /app
2121
COPY --from=deps /app/node_modules ./node_modules
2222
COPY . .
2323

24+
# Add cache-busting layer
25+
ARG CACHEBUST=1
26+
2427
# Set environment variables
2528
ENV NEXT_TELEMETRY_DISABLED 1
2629
ENV NODE_ENV production

0 commit comments

Comments
ย (0)