forked from mikus-loli/Meting-API
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 694 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 694 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
32
33
FROM node:23-alpine3.20 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
FROM node:23-alpine3.20
WORKDIR /app
ARG UID=1010
ARG GID=1010
ARG PORT=3000
ENV UID=${UID}
ENV GID=${GID}
ENV PORT=${PORT}
RUN apk add --no-cache su-exec chromium nss freetype harfbuzz ca-certificates \
&& addgroup -g ${GID} --system meting \
&& adduser -G meting --system -D -s /bin/sh -u ${UID} meting
COPY --from=builder /app /app
RUN sed -i 's/\r$//' /app/docker-entrypoint.sh \
&& chmod +x /app/docker-entrypoint.sh \
&& mkdir -p /app/data \
&& chown -R meting:meting /app
ENTRYPOINT ["/app/docker-entrypoint.sh"]
EXPOSE ${PORT}
CMD ["node", "/app/node.js"]