Skip to content

Commit dfb2390

Browse files
authored
Python 3.13 transition (#38)
1 parent d8ee8ff commit dfb2390

File tree

2 files changed

+58
-38
lines changed

2 files changed

+58
-38
lines changed

Dockerfile

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
11
# 🌄 PDS Engineering: GitHub Actions Base
22
# =======================================
33

4-
FROM python:3.9.16-alpine3.16
4+
FROM python:3.13.5-alpine3.22
55

66

7-
# Support
8-
# -------
7+
# Varaibles and Support
8+
# ---------------------
9+
#
10+
# Set up the various variables and the image metadata.
11+
#
912
#
1013
# Python Package Pins
1114
# ~~~~~~~~~~~~~~~~~~~
15+
#
16+
# It would be nice to use Alpine's own package manager (`apk`) to install a
17+
# number of Python packages, however, despite the official python:3.13.5 image
18+
# being based on alpine3.22, alpine3.22 itself has standardized on python 3.12.
19+
# Therefore, we have to `pip install` all of our dependencies and avoid the
20+
# apk py3-* packages.
1221

13-
ENV github3_py 1.3.0
14-
ENV lxml 4.6.3
15-
ENV numpy 1.21.2
16-
ENV pandas 1.3.4
17-
ENV requests 2.23.0
18-
ENV sphinx 3.0.4
19-
ENV sphinx_substitution_extensions 2020.5.27.0
20-
ENV sphinx_argparse 0.2.5
21-
ENV sphinx_rtd_theme 0.5.0
22-
ENV sphinxcontrib_redoc 1.6.0
23-
ENV sphinx_copybutton 0.5.2
24-
ENV twine 3.4.2
22+
ENV github3_py=4.0.1
23+
ENV lxml=6.0.0
24+
ENV numpy=2.2.3
25+
ENV pandas=2.3.0
26+
ENV requests=2.32.4
27+
ENV sphinx_argparse=0.5.2
28+
ENV sphinx_copybutton=0.5.2
29+
ENV sphinx_rtd_theme=3.0.2
30+
ENV sphinx_substitution_extensions=2025.6.6
31+
ENV sphinx=8.2.3
32+
ENV sphinxcontrib_redoc=1.6.0
33+
ENV twine=6.1.0
2534

2635

2736
# Node.js Package Pins
2837
# ~~~~~~~~~~~~~~~~~~~~
2938

30-
ENV jest 29.7
31-
ENV jsdoc 4.0.2
39+
ENV jest=29.7
40+
ENV jsdoc=4.0.2
41+
3242

3343
# Metadata
3444
# ~~~~~~~~
@@ -45,28 +55,40 @@ LABEL "maintainer"="Sean Kelly <kelly@seankelly.biz>"
4555

4656
COPY m2-repository.tar.bz2 /tmp
4757
WORKDIR /root
58+
59+
60+
# Base packages from the package manager, `apk`
61+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62+
4863
RUN : &&\
4964
mkdir /root/.m2 &&\
5065
tar x -C /root/.m2 -j -f /tmp/m2-repository.tar.bz2 &&\
5166
rm /tmp/m2-repository.tar.bz2 &&\
5267
apk update &&\
5368
apk add --no-progress --virtual /build ruby-dev make cargo &&\
54-
apk add --no-progress bash git-lfs gcc g++ musl-dev libxml2 libxslt git ruby ruby-etc ruby-json ruby-multi_json ruby-io-console ruby-bigdecimal openssh-client maven openjdk8 gnupg libgit2-dev libffi-dev libxml2-dev libxslt-dev python3-dev openssl-dev npm &&\
55-
pip install --upgrade \
56-
pip setuptools wheel build \
57-
github3.py==${github3_py} \
58-
lxml==${lxml} \
59-
numpy==${numpy} \
60-
pandas==${pandas} \
61-
requests==${requests} \
62-
sphinx==${sphinx} \
63-
sphinx-argparse==${sphinx_argparse} \
64-
sphinx-rtd-theme==${sphinx_rtd_theme} \
65-
sphinxcontrib-redoc==${sphinxcontrib_redoc} \
66-
sphinx-substitution-extensions==${sphinx_substitution_extensions} \
67-
sphinx-copybutton==${sphinx_copybutton} \
68-
twine==${twine} \
69-
&&\
69+
apk add --no-progress bash git-lfs gcc g++ musl-dev libxml2 libxslt git ruby ruby-libs ruby-multi_json &&\
70+
apk add --no-progress openssh-client maven openjdk8 gnupg libgit2-dev libffi-dev libxml2-dev libxslt-dev &&\
71+
apk add --no-progress openssl-dev npm &&\
72+
:
73+
74+
75+
# Python packages from `pip`
76+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
RUN : &&\
79+
pip install --quiet --upgrade pip setuptools wheel build &&\
80+
pip install --quiet github3.py==${github3_py} lxml==${lxml} numpy==${numpy} pandas==${pandas} &&\
81+
pip install --quiet requests==${requests} sphinx_argparse==${sphinx_argparse} &&\
82+
pip install --quiet sphinx_copybutton==${sphinx_copybutton} sphinx_rtd_theme==${sphinx_rtd_theme} &&\
83+
pip install --quiet sphinx_substitution_extensions==${sphinx_substitution_extensions} sphinx==${sphinx} &&\
84+
pip install --quiet sphinxcontrib_redoc==${sphinxcontrib_redoc} twine==${twine} &&\
85+
:
86+
87+
88+
# Node.js packages from `npm`
89+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
90+
91+
RUN : &&\
7092
gem install github_changelog_generator --version 1.16.4 &&\
7193
npm install --save-dev jest@${jest} jsdoc@${jsdoc} &&\
7294
wget -qP /usr/local/bin https://github.com/X1011/git-directory-deploy/raw/master/deploy.sh &&\

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,11 @@ To make a release of this image on the [Docker Hub](https://hub.docker.com/), do
5151
But if you ever need to do that by hand, try this:
5252

5353
```console
54-
docker image build --tag github-actions-base:latest .
55-
docker image tag github-actions-base:latest nasapds/github-actions-base:latest
56-
docker login
57-
docker image push nasapds/github-actions-base:latest
54+
docker login --username nasapds
55+
docker buildx build --tag nasapds/github-actions-base:TAGNAME --platform linux/amd64,linux/arm64 --push .
5856
```
5957

60-
Substitute `:latest` with whatever's appropriate.
58+
Substitute `:TAGNAME` with whatever's appropriate.
6159

6260

6361
## ⏰ Future Work

0 commit comments

Comments
 (0)