webui no cache build

This commit is contained in:
2025-07-05 15:52:30 +07:00
parent b7f608c8ba
commit b8ce7c0d37
2 changed files with 15 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
# Use an official Node.js image as the base
FROM node:22.14.0-alpine
# Add build argument for cache busting
ARG CACHEBUST=1
# Set the working directory in the container
WORKDIR /app
@@ -18,8 +21,12 @@ RUN apk update && apk add --no-cache git python3 make g++
# COPY package*.json ./
COPY /src/Managing.WebApp/package.json ./
# Use cache busting argument to force cache invalidation
RUN echo "Cache bust: $CACHEBUST"
# Install dependencies with the --legacy-peer-deps flag to bypass peer dependency conflicts
RUN npm install --legacy-peer-deps --loglevel verbose
# Add --no-cache flag to prevent npm cache usage
RUN npm install --legacy-peer-deps --loglevel verbose --no-cache
RUN npm install -g tailwindcss postcss autoprefixer @tailwindcss/typography
# Copy the rest of the app's source code to the container

View File

@@ -0,0 +1,7 @@
{
"schemaVersion": 2,
"dockerfilePath": "Dockerfile-web-ui-dev",
"buildArgs": {
"CACHEBUST": "{{BUILD_NUMBER}}"
}
}