Add CACHEBUST build arg to force Docker image rebuilds

Docker's build cache was preventing Portainer from picking up
code changes. Adding a CACHEBUST ARG before COPY invalidates
all subsequent layers when the value changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-13 18:05:40 +00:00
parent 330345c1ac
commit bb281b488b
4 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
# Cache-bust: change CACHEBUST value in docker-compose.yml to force rebuild
ARG CACHEBUST=1
# Copy source and build
COPY . .
RUN npm run build