feat: force-disable the --init flag for linuxserver images

All linuxserver images uses S6, and there are enough of them that this makes sense to autodetect on behalf of users.
This commit is contained in:
Jose Diaz-Gonzalez
2022-08-10 21:31:57 -04:00
parent c4c6ac5617
commit 293ead4f35
2 changed files with 9 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ source "$PLUGIN_AVAILABLE_PATH/checks/functions"
main() {
declare APP="$1" IMAGE_SOURCE_TYPE="$2" IMAGE="$3" IMAGE_TAG="$4" PROC_TYPE="$5" PROC_COUNT="$6"
local CONTAINER_INDEX=1
local image_vendor
dokku_log_info1 "Deploying $PROC_TYPE (count=$PROC_COUNT)"
DOKKU_CHECKS_DISABLED="$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")"
@@ -36,6 +37,12 @@ main() {
done
INJECT_INIT_FLAG="$(fn-plugin-property-get "scheduler-docker-local" "$APP" "init-process" "true")"
# special-case linuxserver.io images as those always use an s6-overlay
image_vendor="$("$DOCKER_BIN" image inspect --format '{{ index .Config.Labels "org.opencontainers.image.vendor" }}' "$IMAGE")"
if [[ "$image_vendor" == "linuxserver.io" ]]; then
INJECT_INIT_FLAG="false"
fi
PARALLEL_DEPLOY_COUNT="$(plugn trigger "app-json-process-deploy-parallelism" "$APP" "$PROC_TYPE")"
DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED" parallel --will-cite --halt soon,fail=1 --jobs "$PARALLEL_DEPLOY_COUNT" --ungroup <"$PROCESS_TMP_FILE"