CLear yarn package at build
This commit is contained in:
@@ -17,10 +17,7 @@ WORKDIR /app
|
||||
|
||||
# Copy the package.json and package-lock.json first to leverage Docker's cache
|
||||
COPY ./src/Managing.WebApp/package*.json ./
|
||||
#RUN npm config set registry http://registry.cnpmjs.org
|
||||
# Install dependencies
|
||||
#RUN npm ci --production --loglevel=verbose
|
||||
#RUN npm i --omit=dev --loglevel=verbose
|
||||
|
||||
RUN apk update && apk add --no-cache git
|
||||
# Remove Yarn and Yarnpkg binaries if they exist
|
||||
RUN rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg
|
||||
@@ -28,19 +25,22 @@ RUN rm -f /usr/local/bin/yarn /usr/local/bin/yarnpkg
|
||||
# Install Yarn globally
|
||||
RUN npm install -g yarn
|
||||
|
||||
# Clear Yarn cache
|
||||
RUN yarn cache clean
|
||||
|
||||
#RUN npm i --max-old-space-size=12000 --loglevel=verbose
|
||||
#RUN yarn add eslint-plugin-jsdoc@37.9.7 --dev --ignore-engines
|
||||
# Use npm registry
|
||||
RUN yarn config set registry https://registry.npmjs.org/
|
||||
|
||||
# Install dependencies
|
||||
RUN yarn install --verbose
|
||||
|
||||
# Copy the application code
|
||||
COPY ./src/Managing.WebApp/ /app/
|
||||
RUN ls -alh
|
||||
RUN ls -alh src/
|
||||
# Build the Vite application
|
||||
#RUN npm run build
|
||||
#RUN node --max-old-space-size=8192 ./node_modules/.bin/vite build
|
||||
|
||||
# Build the Vite application
|
||||
RUN node --max-old-space-size=8192 ./node_modules/.bin/vite build
|
||||
|
||||
# Stage 2: Create the runtime image
|
||||
FROM nginx:alpine
|
||||
|
||||
Reference in New Issue
Block a user