mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Use npm instead of yarn in Dockerfile
There is a minor difference in syntax when starting the application with `npm run serve`. We use `--` to make sure npm doesn't try to parse the `--host 0.0.0.0` as an option, allowing it instead to be read by Angular CLI (ng). Also, there is no direct npm equivalent to yarn's --network-timeout option so I will remove it. If we need something similar later we might be able to use these config options: npm config set fetch-retry-mintimeout 300000 npm config set fetch-retry-maxtimeout 300000
This commit is contained in:
@@ -11,11 +11,11 @@ FROM node:18-alpine AS build
|
||||
RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --network-timeout 300000
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
ADD . /app/
|
||||
RUN yarn build:prod
|
||||
RUN npm run build:prod
|
||||
|
||||
FROM node:18-alpine
|
||||
RUN npm install --global pm2
|
||||
|
Reference in New Issue
Block a user