From d3910affd21ae8d2664604748c5895f0868169b9 Mon Sep 17 00:00:00 2001 From: Kacper Jarocki Date: Fri, 20 Oct 2023 16:35:58 +0200 Subject: [PATCH] created docker file --- frontend/Dockerfile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index a9fb09b..5d2a88e 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,23 @@ -FROM ubuntu:latest -LABEL authors="kacper" +# Use an official Node.js runtime as the base image +FROM node:16 as build + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install -g @angular/cli + +RUN npm install + +COPY . . + +RUN ng build + +FROM nginx:alpine + +COPY --from=build /app/dist/frontend /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] -ENTRYPOINT ["top", "-b"]