Skip to content

Commit

Permalink
Merge pull request #2060 from dokku/mh-filter-restart-exec-json
Browse files Browse the repository at this point in the history
filter restart policies from exec-app-json containers
  • Loading branch information
josegonzalez committed Apr 1, 2016
2 parents 6450f93 + a93e180 commit 9da47d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/00_dokku-standard/exec-app-json-scripts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ execute_script() {
local COMMAND+=" echo removing installation cache... ; "
local COMMAND+=" rm -f /tmp/cache || true ; "
local COMMAND+=" exit \$RC "
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"

local DOCKER_ARGS_RESTART_RE="(.*)--restart=.+([\s,$])"
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
# strip --restart args from DOCKER_ARGS
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")

# shellcheck disable=SC2086
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" $DOCKER_ARGS "$IMAGE" /bin/bash -c "$COMMAND")
test "$(docker wait "$id")" -eq 0 || (dokku_container_log_verbose_quiet "$id"; exit 1)
Expand Down

0 comments on commit 9da47d8

Please sign in to comment.