29 lines
692 B
Docker
29 lines
692 B
Docker
FROM node:18.17.0 as build
|
|
|
|
# ENV CI=true
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
RUN npm config set @strata:registry http://proget.sdt.local/npm/npm
|
|
RUN npm config set strict-ssl false
|
|
COPY src/Strata.Stratasphere.Web/template/package*.json ./
|
|
RUN npm cache verify
|
|
RUN npm install --legacy-peer-deps
|
|
RUN npm ci --legacy-peer-deps
|
|
|
|
RUN npx browserslist@latest --update-db
|
|
|
|
# Copy in rest of app and build
|
|
COPY src/Strata.Stratasphere.Web/template/ .
|
|
RUN npm run build
|
|
|
|
# Run tests
|
|
#RUN npm run test
|
|
|
|
# Build release container
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/build /usr/share/nginx/html
|
|
COPY src/Strata.Stratasphere.Web/nginx.conf /etc/nginx/conf.d/default.conf
|