Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to ubuntu 24.04, latest versions of phusion base & passenger (SCP-5877) #33

Merged
merged 37 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e166bd0
Updating to latest versions of all images
bistline Mar 12, 2025
6d3a241
Dealing with registry name issues
bistline Mar 12, 2025
f80c91b
debugging make/dockerfile contents
bistline Mar 12, 2025
bfacd6c
fixing sed command
bistline Mar 12, 2025
6266e42
debugging
bistline Mar 12, 2025
4ff4f61
more REGISTRY debugging
bistline Mar 12, 2025
dd543b6
more REGISTRY debugging
bistline Mar 12, 2025
ac5e073
more REGISTRY debugging
bistline Mar 12, 2025
934192f
REGISTRY debugging, using ubuntu 22.04 runner
bistline Mar 12, 2025
d59ba54
working on Dockerfile
bistline Mar 12, 2025
6e33d75
working on Dockerfiles
bistline Mar 12, 2025
2e404b8
debugging Dockerfile
bistline Mar 12, 2025
8d4d317
backdating to ruby 3.2 build
bistline Mar 12, 2025
0b7ddd6
fixing image tag to use latest-$ARCH
bistline Mar 12, 2025
a7c8fa0
specifying DOCKER_BUILDKIT=0 to get around docker context issue
bistline Mar 12, 2025
2b8501c
more buildx platform fixes
bistline Mar 12, 2025
93af893
trying default context
bistline Mar 12, 2025
5a56594
trying pull=false
bistline Mar 12, 2025
9cb74f3
trying pull=false
bistline Mar 12, 2025
772e634
trying anything at this point
bistline Mar 12, 2025
c54f0db
trying anything at this point
bistline Mar 12, 2025
af63bb7
trying removing syntax line, other env vars
bistline Mar 12, 2025
b6df6cd
backdating source image version, trying other things
bistline Mar 12, 2025
d937358
trying full build
bistline Mar 12, 2025
b6ba79c
checking Makefile
bistline Mar 12, 2025
2882b9c
fixing line no
bistline Mar 12, 2025
d602d9a
trying explicit build_base first
bistline Mar 12, 2025
4028caa
trying explicit buildx call
bistline Mar 12, 2025
3a45350
trying explicit buildx call with extra args removed
bistline Mar 12, 2025
bc275cf
PROGRESS!!! updating libaio1t64, trying intermediate make call
bistline Mar 12, 2025
8db2f22
fixing Docker image name/tag for intermediate image
bistline Mar 12, 2025
3c927fc
using correct intermediate base image name
bistline Mar 12, 2025
f4e4c77
adding missing namespace
bistline Mar 12, 2025
40738e8
fixing typos
bistline Mar 12, 2025
68a3026
trying docker.io name to avoid double build
bistline Mar 12, 2025
6e9ce38
reverting to explicit build_base, disable arm64 builds
bistline Mar 12, 2025
971f887
cleaning up variables/comments
bistline Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/bash_include/dockerhub.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
27 changes: 18 additions & 9 deletions lib/bin/rebuild_phusion_passenger_image
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions requirements.bash
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
3.0.0
Loading