timemanager/frontend/Dockerfile
Sebastian Böckelmann 157126d404
All checks were successful
Java CI with Maven / build (push) Successful in 59s
Deploy on docker (not productive yet!)
2023-11-12 16:43:39 +01:00

19 lines
399 B
Docker

### STAGE 1: Build ###
FROM node:18.17.1 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build --prod
### STAGE 2: Deploy ###
FROM nginx:latest
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install iputils-ping -y
COPY --from=build /app/dist/frontend /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]