Newer
Older
# Stage 0, based on Node.js, to build and compile Angular
FROM node:8.10.0 as builder
# Copy the package.json file first in order to cache the modules
COPY ./package.json /app/package.json
WORKDIR /app
# Install npm dependencies
RUN npm install
# Copy the project
COPY . /app
# Launch postinstall script (to include crypto module)
RUN npm run postinstall
FORESTIER Fabien
committed
RUN npm run build:${conf}
# Stage 1, based on Nginx, to have only the compiled app
FROM nginx
COPY --from=builder /app/dist/admin-gui /usr/share/nginx/html