-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
25 lines (21 loc) · 788 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL "org.opencontainers.image.title"="CutSolverFrontend"
LABEL "org.opencontainers.image.vendor"="Modisch Fabrications"
LABEL "org.opencontainers.image.source"="https://github.com/ModischFabrications/CutSolverFrontend/"
LABEL "org.opencontainers.image.licenses"="GPL-3.0"
COPY --from=build-stage /app/dist /usr/share/nginx/html
# env replacement
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
EXPOSE 80
# curl not in alpine package
HEALTHCHECK --interval=1m --timeout=5s CMD wget -q --spider http://0.0.0.0:80/ || exit 1
ENTRYPOINT [ "/entrypoint.sh" ]