forked from DocHubTeam/DocHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (20 loc) · 670 Bytes
/
Dockerfile
File metadata and controls
33 lines (20 loc) · 670 Bytes
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
# syntax = docker/dockerfile:1.3
ARG NODE_VERSION=20
FROM node:${NODE_VERSION}-alpine AS deps
WORKDIR /var/www
COPY package.json package-lock.json ./
COPY plugins ./plugins/
# RUN --mount=type=cache,target=/root/.npm npm install
RUN npm install
FROM node:${NODE_VERSION}-alpine AS builder
WORKDIR /var/www
COPY --from=deps /var/www .
COPY . .
COPY --from=deps /var/www/plugins ./plugins/
ENV NODE_ENV=production
# RUN --mount=type=cache,target=./node_modules/.cache npm run build
RUN npm run build
CMD ["npm", "run", "serve"]
EXPOSE 8080
FROM ghcr.io/rabotaru/dochub/nginx:v0.0.3 as nginx
COPY --chown=101 --from=builder /var/www/dist /usr/share/nginx/html