-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (20 loc) · 929 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
26
27
28
29
30
31
32
33
34
FROM node:18.19.0-bullseye-slim@sha256:b816d45defe8dc6a07321f05b7e58a841f97e612f6f6ea0a3be44ea7d77474a1 AS builder
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/toolen/passgen-web-client"
ENV DEBIAN_FRONTEND=noninteractive
RUN mkdir /app
COPY package.json package-lock.json vite.config.js /app/
COPY src /app/src
WORKDIR /app
RUN set -ex \
&& npm i \
&& npm run build
FROM nginxinc/nginx-unprivileged:1.26-alpine3.20@sha256:a6c15b8056a0b9c4551d1f32ccde5020f3742beb09cb3e36d76a3f1bbe0bc6eb
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/toolen/passgen-web-client"
USER root
RUN apk upgrade \
&& apk add --no-cache curl=8.11.1-r0
USER nginx
COPY --from=builder /app/dist /usr/share/nginx/html
HEALTHCHECK --interval=30s --timeout=30s --retries=3 CMD curl --silent --show-error http://127.0.0.1 || exit 1