-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 936 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
30
31
32
33
34
35
36
37
# Building the dist/ code
FROM node:18-alpine as builder
WORKDIR /app
COPY tsconfig.json ./
COPY package*.json ./
RUN npm install --include=dev
COPY src src
RUN npm run build
# Dependencies
FROM node:18-alpine as dependencies
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
# Final step
FROM node:18-alpine
WORKDIR /app
LABEL org.opencontainers.image.title="Keep a Changelog Parser" \
org.opencontainers.image.description="Parses a provided path to a Keep a Changelog file and returns the contents" \
org.opencontainers.image.authors="Leon Rowland <leon@rowland.nl>" \
org.opencontainers.image.url="https://github.com/zogot/kacl-parser"
USER node
COPY --from=builder --chown=node:node /app/dist /app/dist
COPY --from=dependencies --chown=node:node /app/node_modules /app/node_modules
COPY --from=dependencies --chown=node:node /app/package.json /app/package.json
ENTRYPOINT ["node", "/app/dist/main.js"]