-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
26 lines (18 loc) · 625 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
# Use the latest LTS version of Node.js as the base image
FROM node:lts-slim as builder
# Set the working directory in the container
WORKDIR /app
# Copy the package.json and package-lock.json files to the container
COPY . .
# Install the application dependencies
RUN npm install && npm run build
FROM node:lts-slim
# Copy the application source code to the container
WORKDIR /app
COPY package*.json ./
RUN npm install --only=production
COPY --from=builder /app/dist ./dist
COPY ./tests ./tests
RUN npm link --only=production
# Set the command to run the application when the container starts
ENTRYPOINT [ "datagen" ]