-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (30 loc) · 698 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
40
41
42
43
44
FROM node:22 AS builder
ARG GIT_REVISION
ARG BUILD_DATE
ARG GIT_BRANCH
ARG GIT_REMOTE
ARG GIT_TAG
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm install
COPY LICENSE .
COPY vite.config.js .
COPY .eslintrc.cjs .
COPY public public
COPY src src
COPY docs docs
COPY index.html .
COPY docs.html .
ENV NODE_ENV production
RUN npm run build
RUN echo '{' \
'"gitTag": "'${GIT_TAG}'",' \
'"gitBranch": "'${GIT_BRANCH}'",' \
'"gitRevision": "'${GIT_REVISION}'",' \
'"gitRemote": "'${GIT_REMOTE}'",' \
'"buildDate": "'${BUILD_DATE}'"' \
'}' > dist/version.json
FROM busybox:stable
WORKDIR /app
COPY --from=builder /app/dist ./