From 2d776292c3e5156a2e853fd618a1bb712acc02ce Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Thu, 13 Nov 2014 17:04:39 +0100 Subject: [PATCH] Added environment variable for base container In order to be able to use a different base image i have added another environment variable where everybody can switch the used base container for the applications directly through the environment variable DOKKU_IMAGE or with the help of the dokkurc configuration. --- dokku | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dokku b/dokku index 2f0ec3b93..934b9649b 100755 --- a/dokku +++ b/dokku @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -eo pipefail + +export DOKKU_IMAGE=${DOKKU_IMAGE:="progrium/buildstep"} export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"} + export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"} [[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc @@ -36,7 +39,7 @@ case "$1" in build) APP="$2"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache" - id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app") + id=$(cat | docker run -i -a stdin $DOKKU_DISTRO /bin/bash -c "mkdir -p /app && tar -xC /app") test $(docker wait $id) -eq 0 docker commit $id $IMAGE > /dev/null [[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR