first pass at dockerfile support

This commit is contained in:
Michael Hobbs
2015-02-07 10:47:04 -08:00
parent 122df4cdaf
commit 7357df7c9d
18 changed files with 292 additions and 68 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
STDIN=$(cat); APP="$1"; IMAGE="dokku/$APP"
DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE"
if ! is_image_buildstep_based "$IMAGE"; then
> "$DOCKERFILE_ENV_FILE"
[[ -f "$DOKKU_ROOT/ENV" ]] && sed -e "s:^export ::g" "$DOKKU_ROOT/ENV" > "$DOCKERFILE_ENV_FILE"
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && sed -e "s:^export ::g" "$DOKKU_ROOT/$APP/ENV" >> "$DOCKERFILE_ENV_FILE"
echo "$STDIN --env-file=$DOCKERFILE_ENV_FILE"
else
echo "$STDIN"
fi