feat: add method for pulling files when deploying from built images

This allows us to be backwards compatible when executing git:from-image.

The nice thing about this pattern is we can also extend it to other parts of the deployment as well, such asn nginx-vhosts fetching
This commit is contained in:
Jose Diaz-Gonzalez
2022-11-25 17:38:15 -05:00
parent 0857e51c43
commit 171dad8e88
3 changed files with 43 additions and 13 deletions

View File

@@ -26,6 +26,10 @@ trigger-git-git-from-image() {
echo "FROM $DOCKER_IMAGE" >>"$TMP_WORK_DIR/Dockerfile"
echo "LABEL com.dokku.docker-image-labeler/alternate-tags=[\\\"$DOCKER_IMAGE\\\"]" >>"$TMP_WORK_DIR/Dockerfile"
dokku_log_info1 "Pulling image"
"$DOCKER_BIN" image pull "$DOCKER_IMAGE"
export DOKKU_BUILDING_FROM_IMAGE="$DOCKER_IMAGE"
plugn trigger git-from-directory "$APP" "$TMP_WORK_DIR" "$USER_NAME" "$USER_EMAIL"
}