diff --git a/templates/example/_install.sh b/templates/example/_install.sh index 19237e7..fc2b11a 100755 --- a/templates/example/_install.sh +++ b/templates/example/_install.sh @@ -5,8 +5,6 @@ load_env "$1" || die "Failed to load environment variables" # Required environment variables check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "LOCAL_DATA_FOLDER" -# Test Docker -_check_docker_installed || die "Docker test failed, aborting installation..." # Create local data folder if it doesn't exist if [ -d "${LOCAL_DATA_FOLDER}" ]; then @@ -16,6 +14,10 @@ else mkdir -p "${LOCAL_DATA_FOLDER}" fi +# Test Docker +_check_docker_installed || die "Docker test failed, aborting installation..." + + # check can pull image on remote host and exit if fails docker pull "$IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG" || die "Failed to pull image $IMAGE_REGISTRY/$IMAGE_REPO:$IMAGE_TAG"