From 32709843fb17614e19e84500026ad6e4a45bff69 Mon Sep 17 00:00:00 2001 From: markpeterfejes Date: Tue, 4 Jul 2017 18:10:41 +0200 Subject: [PATCH] Updated Dockerfile - added proper signal handling --- Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a54ed0ba9..f78927a0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,17 @@ -FROM node:6-alpine +FROM node:alpine LABEL maintainer="https://github.com/verdaccio/verdaccio" +RUN apk --no-cache add openssl && \ + wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \ + chmod +x /usr/local/bin/dumb-init && \ + apk del openssl + ENV APPDIR /usr/local/app -RUN mkdir -p "$APPDIR" WORKDIR $APPDIR + ADD . $APPDIR + RUN npm install RUN mkdir -p /verdaccio/storage /verdaccio/conf @@ -22,4 +28,6 @@ EXPOSE $PORT VOLUME ["/verdaccio"] -CMD ["sh", "-c", "${APPDIR}/bin/verdaccio --config /verdaccio/conf/config.yaml --listen 0.0.0.0:${PORT}"] +ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] + +CMD $APPDIR/bin/verdaccio --config /verdaccio/conf/config.yaml