mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
filter incompatible docker option when building dockerfile vs herokuish apps. closes #1609
This commit is contained in:
@@ -23,7 +23,7 @@ case "$1" in
|
||||
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
|
||||
plugn trigger pre-build-buildpack "$APP"
|
||||
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
id=$(docker run -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
|
||||
docker attach $id
|
||||
@@ -40,7 +40,7 @@ case "$1" in
|
||||
plugn trigger pre-build-dockerfile "$APP"
|
||||
|
||||
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
docker build $DOCKER_ARGS $DOKKU_DOCKER_BUILD_OPTS -t "$IMAGE" .
|
||||
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
STDIN=$(cat)
|
||||
APP="$1"
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$2"
|
||||
|
||||
case "$0" in
|
||||
*docker-args-build)
|
||||
@@ -34,7 +34,35 @@ if [[ -f "$PHASE_FILE_PATH" ]]; then
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
output="$output $line"
|
||||
case "$IMAGE_SOURCE_TYPE" in
|
||||
dockerfile)
|
||||
case "$line" in
|
||||
--link*|-v*)
|
||||
continue
|
||||
;;
|
||||
|
||||
*)
|
||||
output="$output $line"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
herokuish)
|
||||
case "$line" in
|
||||
--file*|--build-args*)
|
||||
continue
|
||||
;;
|
||||
|
||||
*)
|
||||
output="$output $line"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
output="$output $line"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done < $PHASE_FILE_PATH
|
||||
|
||||
Reference in New Issue
Block a user