Skip to content

Commit

Permalink
Add browser installation to fe Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Oct 31, 2023
1 parent 955a1c0 commit 720bccc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions dev/config/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FROM node:16 AS installer

WORKDIR /frontend
COPY package*.json /frontend/
RUN npm ci
COPY . /frontend/
# A browser is needed for automated tests
RUN apt-get update && apt-get install -y chromium
ENV CHROME_BIN=/usr/bin/chromium
ENV CHROME_PATH=/usr/lib/chromium/

FROM node:16 AS builder
WORKDIR /frontend
COPY package*.json /frontend/
COPY --from=installer /frontend /frontend

RUN npm ci
RUN npx ng build

EXPOSE 4200
CMD ["node serve"]
FROM nginx:1.12-alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /frontend/dist/ /usr/share/nginx/html/
COPY scripts/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

0 comments on commit 720bccc

Please sign in to comment.