Skip to content

Commit

Permalink
Add versioned Python images for Python versions 3.8-3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhodgson committed Jan 18, 2024
1 parent 57da475 commit 6c4c356
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
- ruby31 # EOL: 2025-03-31
- ruby30 # EOL: 2024-03-31
# https://www.ruby-lang.org/en/downloads/branches/
- python312 # EOL: 2028-10-02
- python311 # EOL: 2027-10-24
- python310 # EOL: 2026-10-04
- python39 # EOL: 2025-10-05
- python38 # EOL: 2024-10-14
# https://devguide.python.org/versions/
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.DS_Store
.vagrant
customizable_image
ruby*_image
jruby*_image
nodejs_image
full_image
base_image
*_image
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Added a Ruby 3.3.0 image
* Upgraded to JRuby 9.3.13.0 (from 9.3.11.0)
* Upgraded to JRuby 9.4.5.0 (from 9.4.3.0)
* Added versioned Python images for Python versions 3.8 to 3.12

## 2.6.0 (release date: 2023-11-20)
* Upgraded to Phusion Passenger 6.0.19 (from 6.0.18).
Expand Down
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,22 @@ endif
FORCE:

SPECIAL_IMAGES := customizable full
SINGLE_VERSION_IMAGES := jruby93 jruby94 nodejs ruby30 ruby31 ruby32 ruby33
CRUBY_IMAGES := ruby30 ruby31 ruby32 ruby33
PYTHON_IMAGES := python38 python39 python310 python311 python312
MISC_IMAGES := jruby93 jruby94 nodejs

ALL_IMAGES := $(SPECIAL_IMAGES) $(SINGLE_VERSION_IMAGES)
ALL_IMAGES := $(SPECIAL_IMAGES) $(MISC_IMAGES) $(CRUBY_IMAGES) $(PYTHON_IMAGES)

all: build_all

# waits are to ensure that we only compile each version of ruby once per arch even if running parallel
# waits are to ensure that we only compile each version of ruby once per arch even if running in parallel
build_all: \
build_customizable \
.WAIT \
$(foreach image, $(SINGLE_VERSION_IMAGES), build_${image}) \
$(foreach image, $(CRUBY_IMAGES), build_${image}) \
.WAIT \
$(foreach image, $(MISC_IMAGES), build_${image}) \
$(foreach image, $(PYTHON_IMAGES), build_${image}) \
build_full

build_base:
Expand All @@ -69,8 +73,9 @@ build_%: build_base
echo "${*}=1" >> ${*}_image/buildconfig; \
fi
@if [ "${*}" == "full" ]; then \
for i in ${SINGLE_VERSION_IMAGES}; do echo "$${i}=1" >> ${*}_image/buildconfig; done; \
echo python=1 >> ${*}_image/buildconfig; \
for i in ${CRUBY_IMAGES}; do echo "$${i}=1" >> ${*}_image/buildconfig; done; \
for i in ${MISC_IMAGES}; do echo "$${i}=1" >> ${*}_image/buildconfig; done; \
echo python310=1 >> ${*}_image/buildconfig; \
echo redis=1 >> ${*}_image/buildconfig; \
echo memcached=1 >> ${*}_image/buildconfig; \
fi
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ Passenger-docker consists of several images, each one tailor made for a specific
* `phusion/passenger-jruby93` - JRuby 9.3.
* `phusion/passenger-jruby94` - JRuby 9.4.

Python images

* `phusion/passenger-python38` - Python 3.8
* `phusion/passenger-python39` - Python 3.9
* `phusion/passenger-python310` - Python 3.10
* `phusion/passenger-python311` - Python 3.11
* `phusion/passenger-python312` - Python 3.12

**Node.js and Meteor images**

* `phusion/passenger-nodejs` - Node.js 18.
Expand Down Expand Up @@ -511,7 +519,7 @@ The following example shows how you can add a startup script. This script simply

passenger-docker images contain an Ubuntu 20.04 operating system. You may want to update this OS from time to time, for example to pull in the latest security updates. OpenSSL is a notorious example. Vulnerabilities are discovered in OpenSSL on a regular basis, so you should keep OpenSSL up-to-date as much as you can.

While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us.
While we release passenger-docker images with the latest OS updates from time to time, you do not have to rely on us. You can update the OS inside passenger-docker images yourself, and it is recommend that you do this instead of waiting for us. This is also especially important to upgrade any installed Python or Node packages to the latest minor version.

To upgrade the OS in the image, run this in your Dockerfile:

Expand Down
6 changes: 5 additions & 1 deletion image/install_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ if [[ "$ruby32" = 1 ]]; then run /pd_build/ruby-3.2.*.sh; fi
if [[ "$ruby33" = 1 ]]; then run /pd_build/ruby-3.3.*.sh; fi
if [[ "$jruby93" = 1 ]]; then run /pd_build/jruby-9.3.*.sh; fi
if [[ "$jruby94" = 1 ]]; then run /pd_build/jruby-9.4.*.sh; fi
if [[ "$python" = 1 ]]; then run /pd_build/python.sh; fi
if [[ "$nodejs" = 1 ]]; then run /pd_build/nodejs.sh; fi
if [[ "$redis" = 1 ]]; then run /pd_build/redis.sh; fi
if [[ "$memcached" = 1 ]]; then run /pd_build/memcached.sh; fi
if [[ "$python38" = 1 ]]; then run /pd_build/python.sh 3.8; fi
if [[ "$python39" = 1 ]]; then run /pd_build/python.sh 3.9; fi
if [[ "$python310" = 1 ]]; then run /pd_build/python.sh 3.10; fi
if [[ "$python311" = 1 ]]; then run /pd_build/python.sh 3.11; fi
if [[ "$python312" = 1 ]]; then run /pd_build/python.sh 3.12; fi

# Must be installed after Ruby, so that we don't end up with two Ruby versions.
run /pd_build/nginx-passenger.sh
Expand Down

0 comments on commit 6c4c356

Please sign in to comment.