forked from LavaMoat/LavaMoat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 794 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 794 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
# syntax=docker/dockerfile:1.14
# development and testing image
# contains the entire built source-repository under /app
ARG NODE_VERSION=18
ARG BASE_IMAGE_DIGEST=sha256:b33d7471a6a5106cceb3b6e4368841e06338ff6e5e8b2ff345e2e17f15902d7d # docker.io/library/node:18-alpine
FROM docker.io/library/node:${NODE_VERSION}-alpine@${BASE_IMAGE_DIGEST}
WORKDIR /app
RUN apk add --no-cache \
bash git jq \
# for node-gyp builds \
python3 build-base make \
&& chown node:node /app
COPY --chown=node:node . .
USER node
ARG GIT_USER_NAME="Your Name"
ARG GIT_USER_EMAIL="you@example.com"
RUN git config --global user.email "${GIT_USER_EMAIL}" && \
git config --global user.name "${GIT_USER_NAME}" && \
npm ci && \
npm run setup && \
npm run build
ENTRYPOINT ["/usr/local/bin/npm"]