This change adds a new builder - builder-cnb - via the 'DOKKU_CNB_EXPERIMENTAL' environment variable. While support for customizing pack builds is not currently implemented and there may be other missing functionality, this initial implementation allows folks to start playing with CNB. Future releases of Dokku will provide tighter CNB integration and eventually switch to CNB for default building, as well as allow users to better select builders needed for their applications. All new code for CNB support should be considered experimental and subject to change as the support evolves over time.
23 lines
862 B
Bash
Executable File
23 lines
862 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
trigger-builder-dockerfile-builder-release() {
|
|
declare desc="builder-dockerfile builder-release plugin trigger"
|
|
declare trigger="builder-release"
|
|
declare BUILDER_TYPE="$1" APP="$2" IMAGE_TAG="$3"
|
|
|
|
if [[ "$BUILDER_TYPE" != "dockerfile" ]]; then
|
|
return
|
|
fi
|
|
|
|
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
|
|
|
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
|
echo "FROM $IMAGE" | suppress_output "$DOCKER_BIN" image build --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku -t "$IMAGE" -
|
|
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
|
}
|
|
|
|
trigger-builder-dockerfile-builder-release "$@"
|