-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
29 lines (18 loc) · 745 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
FROM node:20.16.0-alpine3.20@sha256:eb8101caae9ac02229bd64c024919fe3d4504ff7f329da79ca60a04db08cef52
USER root
# Update packages as a result of Anchore security vulnerability checks
RUN apk update && \
apk add --upgrade gnutls binutils nodejs npm apk-tools libjpeg-turbo libcurl libx11 libxml2
# Setup nodejs group & nodejs user
RUN addgroup --system nodejs --gid 998 && \
adduser --system nodejs --uid 999 --home /app/ && \
chown -R 999:998 /app/
USER 999
WORKDIR /app
COPY --chown=999:998 . /app
RUN yarn install --frozen-lockfile --production --ignore-optional && \
yarn run postinstall
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl --fail http://localhost:8080 || exit 1
CMD ["sh", "/app/run.sh"]
EXPOSE 8080