-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (26 loc) · 906 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
# syntax=docker/dockerfile:1.6
# ^ needed for ADD --checksum=…
FROM node:20-alpine as builder
WORKDIR /app
# install dependencies
# There are some (transitive) dependencies that need a C++ compiler, so we build them in a separate stage.
RUN apk add --update \
g++ \
make \
python3
ADD package.json /app
RUN npm install --production
# ---
FROM node:20-alpine
WORKDIR /app
LABEL org.opencontainers.image.title="vdv-453-nats-adapter"
LABEL org.opencontainers.image.description="An HTTP API for Berlin & Brandenburg public transport."
LABEL org.opencontainers.image.authors="Verkehrsverbund Berlin Brandenburg <[email protected]>"
LABEL org.opencontainers.image.documentation="https://github.com/OpenDataVBB/vbb-rest/tree/7"
# install dependencies
COPY --from=builder /app/node_modules ./node_modules
# add source code
ADD . /app
# CLI some test
RUN ./cli.js --help >/dev/null
ENTRYPOINT [ "./cli.js"]