-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
39 lines (30 loc) · 988 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
38
39
FROM node:18-alpine as builder
WORKDIR /app
# install dependencies
RUN apk add --update git bash
ADD package.json /app
RUN npm install
# build documentation
ADD . /app
RUN npm run build
# ---
FROM node:18-alpine
LABEL org.opencontainers.image.title="vbb-rest"
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/6"
LABEL org.opencontainers.image.source="https://github.com/derhuerst/vbb-rest"
LABEL org.opencontainers.image.revision="6"
LABEL org.opencontainers.image.licenses="ISC"
WORKDIR /app
# install dependencies
RUN apk add --update git
ADD package.json /app
RUN npm install --production && npm cache clean --force
# add source code
ADD . /app
COPY --from=builder /app/docs ./docs
EXPOSE 3000
ENV HOSTNAME v6.vbb.transport.rest
ENV PORT 3000
CMD ["node", "index.js"]