argos/dmp-frontend/Dockerfile

30 lines
480 B
Docker
Raw Normal View History

2020-04-27 15:21:03 +02:00
# stage1 as builder
2024-02-22 08:30:30 +01:00
FROM node:20-alpine AS BUILDER
2020-04-27 15:21:03 +02:00
2022-09-13 09:35:56 +02:00
WORKDIR /app
2020-04-27 15:21:03 +02:00
2022-09-13 09:35:56 +02:00
# copy to install dependencies
COPY . .
2020-04-27 15:21:03 +02:00
# Install the dependencies and make the folder
2022-09-13 09:35:56 +02:00
RUN npm install && npm run ng build -- --prod
2020-04-27 15:21:03 +02:00
FROM nginx:alpine
#!/bin/sh
2022-09-13 09:35:56 +02:00
WORKDIR /usr/share/nginx/html
2020-04-27 15:21:03 +02:00
COPY nginx.conf /etc/nginx
COPY mime.types /etc/nginx
## Remove default nginx index page
2022-09-13 09:35:56 +02:00
RUN rm -rf ./*
2020-04-27 15:21:03 +02:00
# Copy from the stahg 1
2022-09-13 09:35:56 +02:00
COPY --from=BUILDER /app/dist .
2020-04-27 15:21:03 +02:00
EXPOSE 4200
2022-09-13 09:35:56 +02:00
ENTRYPOINT ["nginx", "-g", "daemon off;"]