-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (29 loc) · 926 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
35
36
37
38
39
FROM node:20-alpine as builder
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm ci
# Copy just the files we need from the root to speed up re-building the docker image
COPY tsconfig.json .
COPY tsconfig.node.json .
COPY tsconfig.app.json .
COPY vite.config.ts .
COPY index.html .
COPY ./src/ ./src/
COPY ./public/ ./public/
RUN npm run build
FROM nginxinc/nginx-unprivileged:stable-alpine as production
ARG IMAGE_EXPIRATION=Never
ARG VERSION=v0.0.0-dev
LABEL Name=ui \
Release=https://github.com/appvia/wf-fe-task \
Url=https://github.com/appvia/wf-fe-task
USER root
RUN mkdir "/app" && mkdir "/nginxconf"
COPY --from=builder /app/dist/ /app/
COPY ./entrypoint/app.conf /nginxconf/app.conf
COPY ./entrypoint/http.conf /nginxconf/http.conf
COPY ./entrypoint/docker-entrypoint.sh /
RUN chown -R 101:101 /docker-entrypoint.sh /app /nginxconf
USER nginx
ENTRYPOINT ["/docker-entrypoint.sh"]