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:
@@ -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 . .
|
||||
RUN npm run build
|
||||
RUN npm prune --production
|
||||
|
||||
Reference in New Issue
Block a user