From ee70e6215eb4ec5b752dfff95bb83d56051f0b4d Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 27 Mar 2019 12:19:50 +0100 Subject: [PATCH] let Docker container generate new hafas-client install IDs :bug: see derhuerst/bvg-rest#4 --- Dockerfile | 9 ++++++--- docker-entrypoint.sh | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 2886efb..a175925 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,14 @@ FROM node:alpine WORKDIR /app ADD . /app -RUN npm install --production +RUN apk add --update git bash && \ + npm install --production && \ + apk del git && \ + rm -rf /tmp/* /var/cache/apk/* EXPOSE 3000 -ENV HOSTNAME db.transport.rest +ENV HOSTNAME 3.db.transport.rest ENV PORT 3000 -CMD ["npm", "start"] +CMD ["/bin/sh", "docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100755 index 0000000..9b3638c --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm explore hafas-client -- npm run install +npm start