diff --git a/Dockerfile b/Dockerfile index 091ea45..0c5b579 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # See https://github.com/phusion/passenger-docker/blob/master/Changelog.md for # a list of version numbers. -FROM singlecellportal/phusion_passenger-ruby32:2.5.1 +FROM singlecellportal/phusion_passenger-ruby34:3.1.2 #FROM singlecellportal/phusion_passenger-full:1.0.8 # Or, instead of the 'full' variant, use one of these: @@ -54,7 +54,7 @@ RUN gem install bundler # Install imagemagick + dependencies RUN apt-get update && apt-get install -y -qq --no-install-recommends apt-utils sudo tzdata wget RUN apt-get update && apt-get install -y -qq --no-install-recommends imagemagick ghostscript build-essential unzip net-tools bc curl ssmtp debconf -RUN apt-get update && apt-get install libaio1 shared-mime-info +RUN apt-get update && apt-get install libaio1t64 shared-mime-info RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Install nginx-headers-more package diff --git a/lib/bash_include/dockerhub.bash b/lib/bash_include/dockerhub.bash index 35f7dfb..c4ced86 100644 --- a/lib/bash_include/dockerhub.bash +++ b/lib/bash_include/dockerhub.bash @@ -49,7 +49,6 @@ function docker_image_has_been_published_unsafe { function docker_force_pull { local IMAGE="$1" - echo "Forcefully pulling a fresh version of the docker image \"$IMAGE\":" >&2 if docker inspect $IMAGE --format '.' >/dev/null 2>&1; then # if IMAGE exists docker tag $IMAGE temp || { echo "ERROR: FAILED at $BASH_SOURCE:$LINENO" >&2; return 1; } diff --git a/lib/bin/rebuild_phusion_passenger_image b/lib/bin/rebuild_phusion_passenger_image index f35ad6c..4bc7fcc 100755 --- a/lib/bin/rebuild_phusion_passenger_image +++ b/lib/bin/rebuild_phusion_passenger_image @@ -14,8 +14,9 @@ echo '########################################' PHUSION_PASSENGER_IMAGE_NAME="$(new_image_name_from_repo $PHUSION_PASSENGER_IMAGE_REPO)" IMAGE_FULLNAME="$DOCKER_NAMESPACE/$PHUSION_PASSENGER_IMAGE_NAME" -# add -ruby32 to target image to match Dockerfile -TARGET_IMAGE_NAME="$IMAGE_FULLNAME-ruby32:$PHUSION_PASSENGER_IMAGE_VERSION" +# define Ruby target for use downstream in names/build targets +RUBY_TARGET="ruby34" +TARGET_IMAGE_NAME="$IMAGE_FULLNAME-$RUBY_TARGET:$PHUSION_PASSENGER_IMAGE_VERSION" github_checkout "$PHUSION_PASSENGER_IMAGE_REPO" "$PHUSION_PASSENGER_IMAGE_SOURCE_DIR" "$PHUSION_PASSENGER_IMAGE_REPO_RELEASE_TAG" || exit 1 @@ -25,17 +26,25 @@ export PATH="$BASE_DIR/lib/docker_shim:$PATH" # use a docker shim to filter out # remove registry prepend from Makefile MAKEFILE="Makefile" -sed -i "s/NAME = \$(REGISTRY)\//NAME = /" $MAKEFILE +echo "Removing REGISTRY from image name" +sed -i "s/NAME ?= \$(REGISTRY)\//NAME ?= /" $MAKEFILE # fix Dockerfile.base and Dockerfile use correct images BASE_DOCKER_FILE="./image/Dockerfile.base" sed -i "s~^FROM[[:space:]].\{1,\}$~FROM $DOCKER_NAMESPACE/phusion_baseimage:$PHUSION_BASE_IMAGE_VERSION~" $BASE_DOCKER_FILE DOCKER_FILE="./image/Dockerfile" -sed -i "s~^FROM[[:space:]].\{1,\}$~FROM $DOCKER_NAMESPACE/phusion_passenger-base\:current-\$ARCH~" $DOCKER_FILE -MAKE_TARGET=build_ruby32 -MAKE_OUTPUT="$(make $MAKE_TARGET NAME="$IMAGE_FULLNAME")" || exit_with_error_message "make build FAILED" # build -# due to mismatch of version tag in Makefile vs. version.txt, we must manually tag built image with correct name -# since build_ruby33 will create an arm64 and amd64 image, we need to grab the correct (amd64) image id -BUILT_IMAGE_TAG="$PHUSION_PASSENGER_IMAGE_VERSION-amd64" +ARCH_NAME="amd64" +INTER_IMAGE_NAME="phusion_passenger-base" +INTER_IMAGE_TAG="latest-$ARCH_NAME" +sed -i "s~^FROM[[:space:]].\{1,\}$~FROM $DOCKER_NAMESPACE/$INTER_IMAGE_NAME:$INTER_IMAGE_TAG~" $DOCKER_FILE +# explicitly build intermediate "base" phusion_passenger image as this apparently doesn't build automatically anymore +# set BUILD_ARM64 to 0 (false) to only build amd64 architecture +export BUILD_ARM64=0 +INTER_MAKE_TARGET=build_base +make $INTER_MAKE_TARGET NAME="$DOCKER_NAMESPACE/phusion_passenger" || exit_with_error_message "intermediate make build FAILED" +MAKE_TARGET="build_$RUBY_TARGET" +make $MAKE_TARGET NAME="$IMAGE_FULLNAME" || exit_with_error_message "make build FAILED" # build +# correct name/tags to expected values +BUILT_IMAGE_TAG="$PHUSION_PASSENGER_IMAGE_VERSION-$ARCH_NAME" AMD64_IMAGE_ID="$(docker images | grep $BUILT_IMAGE_TAG | awk '{print $3}')" echo "Re-tagging image $AMD64_IMAGE_ID with: docker tag $AMD64_IMAGE_ID $TARGET_IMAGE_NAME" docker tag $AMD64_IMAGE_ID $TARGET_IMAGE_NAME diff --git a/requirements.bash b/requirements.bash index 9aa474b..cb24f3f 100644 --- a/requirements.bash +++ b/requirements.bash @@ -1,8 +1,8 @@ -BASE_IMAGE="marketplace.gcr.io/google/ubuntu2004:latest" #aggressively keep up with security updates +BASE_IMAGE="marketplace.gcr.io/google/ubuntu2404:latest" #aggressively keep up with security updates # pin to versioned releases of phusion images to avoid breakages PHUSION_BASE_IMAGE_REPO="phusion/baseimage-docker" -PHUSION_BASE_IMAGE_VERSION="focal-1.2.0" +PHUSION_BASE_IMAGE_VERSION="noble-1.0.0" PHUSION_PASSENGER_IMAGE_REPO="phusion/passenger-docker" -PHUSION_PASSENGER_IMAGE_VERSION="2.5.1" #if you change this, you'll have to change the "FROM" line in ./Dockerfile also. +PHUSION_PASSENGER_IMAGE_VERSION="3.1.2" #if you change this, you'll have to change the "FROM" line in ./Dockerfile also. diff --git a/version.txt b/version.txt index 276cbf9..4a36342 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.3.0 +3.0.0