Skip to content

Commit

Permalink
improve frontend image
Browse files Browse the repository at this point in the history
* reduce size by using alpine
* copy the right files to nginx
  • Loading branch information
patrickuhlmann committed Dec 24, 2023
1 parent 9573a4d commit 77c3e85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules
dist
.angular/cache
.angular
14 changes: 7 additions & 7 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM node:18 as build
FROM node:18-alpine as builder

WORKDIR /usr/local/app
COPY ./ /usr/local/app/
WORKDIR /app
COPY package*.json .
RUN npm ci
RUN npm run build
COPY . .
RUN npm run build


FROM nginx:latest
COPY --from=build /usr/local/app/dist/eventoverview /usr/share/nginx/html
FROM nginx:alpine
COPY --from=builder /app/dist/eventoverview/browser /usr/share/nginx/html
EXPOSE 80

0 comments on commit 77c3e85

Please sign in to comment.