From f5370ef1715dc810821bb7e87be3d4afd9bd32dc Mon Sep 17 00:00:00 2001 From: Jaroslav Libak Date: Tue, 18 Aug 2015 16:27:56 +0200 Subject: [PATCH] improving setup.sh --- distribution/release/nodejs/Dockerfile | 2 +- distribution/release/python/Dockerfile | 2 +- setup.sh | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/distribution/release/nodejs/Dockerfile b/distribution/release/nodejs/Dockerfile index 6ff76a8..a53c807 100644 --- a/distribution/release/nodejs/Dockerfile +++ b/distribution/release/nodejs/Dockerfile @@ -7,7 +7,7 @@ COPY . /src # to docker build command to allow setting up proxy ADD setup.sh /tmp/setup.sh RUN chmod +x /tmp/setup.sh -RUN /tmp/setup.sh +RUN /tmp/setup.sh /src # Set the working directory WORKDIR /src diff --git a/distribution/release/python/Dockerfile b/distribution/release/python/Dockerfile index 62abe6e..426c485 100644 --- a/distribution/release/python/Dockerfile +++ b/distribution/release/python/Dockerfile @@ -7,7 +7,7 @@ COPY . /src # to docker build command to allow setting up proxy ADD setup.sh /tmp/setup.sh RUN chmod +x /tmp/setup.sh -RUN /tmp/setup.sh +RUN /tmp/setup.sh /src # Set the working directory WORKDIR /src diff --git a/setup.sh b/setup.sh index 4ad8073..4ea56ef 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ -n "$1" ];then + cd $1 +fi + function test_connection() { curl --connect-timeout 5 -s -X OPTIONS http://www.google.com >> /dev/null @@ -39,7 +43,6 @@ function setup_container() { echo "Setting up container.." - cd /src npm install }