-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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="Jannis R <[email protected]>" | ||
LABEL org.opencontainers.image.documentation="https://github.com/derhuerst/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"] |