-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
26 lines (21 loc) · 1002 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
FROM node:alpine
LABEL org.opencontainers.image.title="gtfs-via-postgres"
LABEL org.opencontainers.image.description="Process GTFS using PostgreSQL."
LABEL org.opencontainers.image.authors="Jannis R <mail@jannisr.de>"
LABEL org.opencontainers.image.documentation="https://github.com/public-transport/gtfs-via-postgres"
LABEL org.opencontainers.image.source="https://github.com/public-transport/gtfs-via-postgres"
LABEL org.opencontainers.image.revision="4.0.0"
LABEL org.opencontainers.image.licenses="(Apache-2.0 AND Prosperity-3.0.0)"
WORKDIR /app
# Both moreutils (providing sponge) and postgresql-client (providing psql) are not required but come in handy for users.
RUN apk add --no-cache \
postgresql-client \
moreutils
ADD package.json /app
RUN npm install --production && npm cache clean --force
ADD . /app
RUN ln -s /app/cli.js /usr/local/bin/gtfs-via-postgres
VOLUME /gtfs
WORKDIR /gtfs
ENTRYPOINT ["/bin/sh", "-eu", "-o", "pipefail", "-c", "/app/cli.js $@", "--"]
CMD ["/gtfs/*.txt"]