From 7bc416f9e6da0926d09cc9618310ef9c870cc0dd Mon Sep 17 00:00:00 2001 From: Hugues Malphettes Date: Fri, 23 Jan 2015 10:21:57 +0800 Subject: [PATCH] Fix #10: missing kibana in the docker image The npm postinstall script was failing when run by the root user during a docker build with the following: ``` npm WARN cannot run in wd kibana-proxy@0.0.0 [ -f kibana/index.html ] && exit 0; mkdir -p kibana; curl https://download.elasticsearch.org/kibana/kibana/kibana-3.1.2.tar.gz | tar xvzf - -C kibana --strip-components=1 (wd=/app) ``` The docker build executes as the root user but npm downgrades its permissions during the npm install. adding universal read and write permissions to the app folder during the build does not prevent the issue. Running `npm install --unsafe-perm` solves the problem. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e8fd5f1..ab21c0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER Hugues MALPHETTES WORKDIR /app ADD . /app -RUN npm install +RUN npm install --unsafe-perm EXPOSE 3003