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