forked from automeris-io/WebPlotDigitizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 891 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 891 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
34
35
36
# syntax=docker/dockerfile:1
ARG NODE_VERSION=23.10.0
FROM node:${NODE_VERSION}-alpine
# Set working directory for all build stages.
WORKDIR /usr/src/app
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci
COPY . .
RUN apk update && apk add python3 py3-jinja2 py3-babel
# Run the build script.
RUN npm run build
# Use production node environment by default.
ENV NODE_ENV development
# Run the application as a non-root user.
# USER node
# Expose the port that the application listens on.
EXPOSE 8080
# Run the application.
CMD npm start