GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add Debian Trixie images · divio/ac-base@e8816dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • py3.10-slim-trixie
    • CHANGELOG.rst
    • Dockerfile
    • add_addons_dev_to_syspath.py
  • py3.11-slim-trixie
    • CHANGELOG.rst
    • Dockerfile
    • add_addons_dev_to_syspath.py
  • py3.12-slim-trixie
    • CHANGELOG.rst
    • Dockerfile
    • add_addons_dev_to_syspath.py
  • py3.13-slim-trixie
    • CHANGELOG.rst
    • Dockerfile
    • add_addons_dev_to_syspath.py
  • py3.9-slim-trixie
    • CHANGELOG.rst
    • Dockerfile
    • add_addons_dev_to_syspath.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎py3.10-slim-trixie/CHANGELOG.rst‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changelog
2+
=========
3+
4+
1.0 (2025-08-19)
5+
----------------
6+
7+
* Initial release of Python 3.10 / Debian Trixie base image.
Collapse file

‎py3.10-slim-trixie/Dockerfile‎

Copy file name to clipboard
+158Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# hadolint global ignore=DL3059
2+
FROM python:3.11.13-slim-trixie AS build
3+
4+
ARG TARGET=prod
5+
ARG TARGETARCH
6+
ARG TINI_VERSION=0.19.0
7+
ARG PIP_VERSION=23.1.2
8+
ARG PIPREQS_VERSION=0.11.0
9+
ARG START_VERSION=0.2
10+
11+
ENV PYTHONUNBUFFERED=1 \
12+
PATH=/root/.local/bin:$PATH \
13+
PROCFILE_PATH=/app/Procfile \
14+
LC_ALL=C.UTF-8
15+
16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17+
18+
RUN mkdir -p /usr/share/man/man1/ /usr/share/man/man7/
19+
20+
RUN apt-get update && apt-get upgrade -y
21+
22+
# Dependencies
23+
# hadolint ignore=DL3008
24+
RUN apt-get install -y --no-install-recommends \
25+
ca-certificates \
26+
curl \
27+
gettext \
28+
libcairo2 \
29+
libcap2-bin \
30+
libffi8 \
31+
libfreetype6 \
32+
libjpeg62-turbo \
33+
libopenjp2-7 \
34+
libssl3 \
35+
libtiff6 \
36+
libxslt1.1 \
37+
libyaml-0-2 \
38+
media-types \
39+
postgresql-client \
40+
wget \
41+
zlib1g
42+
43+
# hadolint ignore=DL3008
44+
RUN if [ "$TARGET" = "dev" ] ; then apt-get install -y --no-install-recommends \
45+
autoconf \
46+
automake \
47+
autotools-dev \
48+
build-essential \
49+
cmake \
50+
gcc \
51+
gfortran \
52+
libopenblas-dev \
53+
libcairo2-dev \
54+
libffi-dev \
55+
libfreetype6-dev \
56+
libjpeg62-turbo-dev \
57+
liblapack-dev \
58+
liblcms2-dev \
59+
libopenjp2-7-dev \
60+
libpq-dev \
61+
libssl-dev \
62+
libtiff-dev \
63+
libwebp-dev \
64+
libxslt-dev \
65+
libyaml-dev \
66+
ninja-build \
67+
pkg-config \
68+
zlib1g-dev \
69+
; fi
70+
71+
# In dev, install Rust as many packages use it behind the scenes
72+
# (e.g. langchain, AI tools, etc.)
73+
# hadolint ignore=SC2086
74+
RUN if [ "$TARGET" = "dev" ] ; then \
75+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
76+
for i in $HOME/.cargo/bin/*; do ln -s "$i" "/usr/bin/$(basename $i)"; done \
77+
fi
78+
79+
# Workaround for a bug in hub.docker.com
80+
RUN ln -s -f /bin/true /usr/bin/chfn
81+
82+
# Install tini
83+
RUN if [ "$TARGETARCH" = "arm64" ] ; then \
84+
curl -L --show-error --retry 5 -o /tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-arm64 ; \
85+
else \
86+
curl -L --show-error --retry 5 -o /tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini ; \
87+
fi
88+
RUN chmod +x /tini
89+
90+
# Python environment setup
91+
RUN pip install --no-cache-dir pip==${PIP_VERSION}
92+
RUN pip install --no-cache-dir pip-reqs==${PIPREQS_VERSION}
93+
RUN pip install --no-cache-dir start==${START_VERSION}
94+
95+
# TODO: Avoid the need for pip-tools
96+
# hadolint ignore=DL3013
97+
RUN if [ "$TARGET" = "dev" ] ; then \
98+
pip install --no-cache-dir pip-tools flit flit-core setuptools-scm poetry auditwheel ; \
99+
fi
100+
101+
COPY add_addons_dev_to_syspath.py /usr/local/lib/python3.11/site-packages/add_addons_dev_to_syspath.py
102+
RUN echo 'import add_addons_dev_to_syspath' >/usr/local/lib/python3.11/site-packages/add_addons_dev_to_syspath.pth
103+
104+
# Cleanup
105+
RUN apt-get autoremove -y && \
106+
apt-get clean && \
107+
rm -rf \
108+
/var/lib/apt/lists/* \
109+
/tmp/* \
110+
/root/.cache \
111+
/var/cache/apt/archives/partial \
112+
/var/log/apt/term.log \
113+
/run/utmp \
114+
/var/log/wtmp \
115+
/var/log/btmp \
116+
/var/log/lastlog
117+
118+
# Application environment setup
119+
RUN mkdir -p /app /data
120+
121+
# The group of the following files has to be changed to root for multistage
122+
# builds to work with userns remapping enabled. This is a bug in the Docker
123+
# legacy builder: https://github.com/moby/moby/issues/34645
124+
125+
# Initially belonging to group staff
126+
RUN chgrp -R root /usr/local /var/local
127+
128+
# Initially belonging to group shadow
129+
RUN chgrp root \
130+
/etc/gshadow \
131+
/etc/shadow \
132+
/usr/bin/expiry \
133+
/usr/bin/chage \
134+
/sbin/unix_chkpwd
135+
136+
# Initially belonging to group tty
137+
RUN chgrp root /usr/bin/wall
138+
139+
# Initially belonging to group mail
140+
RUN chgrp root /var/mail
141+
142+
143+
FROM scratch
144+
COPY --from=build / /
145+
146+
# Execution environment setup
147+
RUN useradd --create-home --user-group -u 1000 app
148+
ENV LC_ALL=C.UTF-8 \
149+
NVM_DIR=/opt/nvm \
150+
PATH=/root/.local/bin:$PATH \
151+
PIP_REQUIRE_VIRTUALENV=false \
152+
PROCFILE_PATH=/app/Procfile \
153+
PYTHONUNBUFFERED=1 \
154+
WHEELS_PLATFORM=bookworm-py311
155+
WORKDIR /app
156+
EXPOSE 80/tcp 443/tcp
157+
ENTRYPOINT ["/tini", "-g", "--"]
158+
CMD ["start", "web"]
Collapse file

‎py3.10-slim-trixie/add_addons_dev_to_syspath.py‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# adds all directories in /app/addons-dev to sys.path
2+
import os
3+
import sys
4+
5+
6+
base_path = os.environ.get('ADDONS_DEV_PATH', '/app/addons-dev')
7+
8+
9+
if os.path.exists(base_path):
10+
all_directories_in_base_path = next(os.walk(base_path))[1]
11+
for pkg in sorted(all_directories_in_base_path, reverse=True):
12+
# sorted in reverse so they end up in alphabetical order (insert(0)
13+
# reverses the order)
14+
pkg_dir = os.path.join(base_path, pkg)
15+
if pkg_dir not in sys.path:
16+
sys.path.insert(0, pkg_dir)
Collapse file

‎py3.11-slim-trixie/CHANGELOG.rst‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changelog
2+
=========
3+
4+
1.0 (2025-08-19)
5+
----------------
6+
7+
* Initial release of Python 3.11 / Debian Trixie base image.
Collapse file

‎py3.11-slim-trixie/Dockerfile‎

Copy file name to clipboard
+158Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# hadolint global ignore=DL3059
2+
FROM python:3.11.13-slim-trixie AS build
3+
4+
ARG TARGET=prod
5+
ARG TARGETARCH
6+
ARG TINI_VERSION=0.19.0
7+
ARG PIP_VERSION=23.1.2
8+
ARG PIPREQS_VERSION=0.11.0
9+
ARG START_VERSION=0.2
10+
11+
ENV PYTHONUNBUFFERED=1 \
12+
PATH=/root/.local/bin:$PATH \
13+
PROCFILE_PATH=/app/Procfile \
14+
LC_ALL=C.UTF-8
15+
16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17+
18+
RUN mkdir -p /usr/share/man/man1/ /usr/share/man/man7/
19+
20+
RUN apt-get update && apt-get upgrade -y
21+
22+
# Dependencies
23+
# hadolint ignore=DL3008
24+
RUN apt-get install -y --no-install-recommends \
25+
ca-certificates \
26+
curl \
27+
gettext \
28+
libcairo2 \
29+
libcap2-bin \
30+
libffi8 \
31+
libfreetype6 \
32+
libjpeg62-turbo \
33+
libopenjp2-7 \
34+
libssl3 \
35+
libtiff6 \
36+
libxslt1.1 \
37+
libyaml-0-2 \
38+
media-types \
39+
postgresql-client \
40+
wget \
41+
zlib1g
42+
43+
# hadolint ignore=DL3008
44+
RUN if [ "$TARGET" = "dev" ] ; then apt-get install -y --no-install-recommends \
45+
autoconf \
46+
automake \
47+
autotools-dev \
48+
build-essential \
49+
cmake \
50+
gcc \
51+
gfortran \
52+
libopenblas-dev \
53+
libcairo2-dev \
54+
libffi-dev \
55+
libfreetype6-dev \
56+
libjpeg62-turbo-dev \
57+
liblapack-dev \
58+
liblcms2-dev \
59+
libopenjp2-7-dev \
60+
libpq-dev \
61+
libssl-dev \
62+
libtiff-dev \
63+
libwebp-dev \
64+
libxslt-dev \
65+
libyaml-dev \
66+
ninja-build \
67+
pkg-config \
68+
zlib1g-dev \
69+
; fi
70+
71+
# In dev, install Rust as many packages use it behind the scenes
72+
# (e.g. langchain, AI tools, etc.)
73+
# hadolint ignore=SC2086
74+
RUN if [ "$TARGET" = "dev" ] ; then \
75+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
76+
for i in $HOME/.cargo/bin/*; do ln -s "$i" "/usr/bin/$(basename $i)"; done \
77+
fi
78+
79+
# Workaround for a bug in hub.docker.com
80+
RUN ln -s -f /bin/true /usr/bin/chfn
81+
82+
# Install tini
83+
RUN if [ "$TARGETARCH" = "arm64" ] ; then \
84+
curl -L --show-error --retry 5 -o /tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-arm64 ; \
85+
else \
86+
curl -L --show-error --retry 5 -o /tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini ; \
87+
fi
88+
RUN chmod +x /tini
89+
90+
# Python environment setup
91+
RUN pip install --no-cache-dir pip==${PIP_VERSION}
92+
RUN pip install --no-cache-dir pip-reqs==${PIPREQS_VERSION}
93+
RUN pip install --no-cache-dir start==${START_VERSION}
94+
95+
# TODO: Avoid the need for pip-tools
96+
# hadolint ignore=DL3013
97+
RUN if [ "$TARGET" = "dev" ] ; then \
98+
pip install --no-cache-dir pip-tools flit flit-core setuptools-scm poetry auditwheel ; \
99+
fi
100+
101+
COPY add_addons_dev_to_syspath.py /usr/local/lib/python3.11/site-packages/add_addons_dev_to_syspath.py
102+
RUN echo 'import add_addons_dev_to_syspath' >/usr/local/lib/python3.11/site-packages/add_addons_dev_to_syspath.pth
103+
104+
# Cleanup
105+
RUN apt-get autoremove -y && \
106+
apt-get clean && \
107+
rm -rf \
108+
/var/lib/apt/lists/* \
109+
/tmp/* \
110+
/root/.cache \
111+
/var/cache/apt/archives/partial \
112+
/var/log/apt/term.log \
113+
/run/utmp \
114+
/var/log/wtmp \
115+
/var/log/btmp \
116+
/var/log/lastlog
117+
118+
# Application environment setup
119+
RUN mkdir -p /app /data
120+
121+
# The group of the following files has to be changed to root for multistage
122+
# builds to work with userns remapping enabled. This is a bug in the Docker
123+
# legacy builder: https://github.com/moby/moby/issues/34645
124+
125+
# Initially belonging to group staff
126+
RUN chgrp -R root /usr/local /var/local
127+
128+
# Initially belonging to group shadow
129+
RUN chgrp root \
130+
/etc/gshadow \
131+
/etc/shadow \
132+
/usr/bin/expiry \
133+
/usr/bin/chage \
134+
/sbin/unix_chkpwd
135+
136+
# Initially belonging to group tty
137+
RUN chgrp root /usr/bin/wall
138+
139+
# Initially belonging to group mail
140+
RUN chgrp root /var/mail
141+
142+
143+
FROM scratch
144+
COPY --from=build / /
145+
146+
# Execution environment setup
147+
RUN useradd --create-home --user-group -u 1000 app
148+
ENV LC_ALL=C.UTF-8 \
149+
NVM_DIR=/opt/nvm \
150+
PATH=/root/.local/bin:$PATH \
151+
PIP_REQUIRE_VIRTUALENV=false \
152+
PROCFILE_PATH=/app/Procfile \
153+
PYTHONUNBUFFERED=1 \
154+
WHEELS_PLATFORM=bookworm-py311
155+
WORKDIR /app
156+
EXPOSE 80/tcp 443/tcp
157+
ENTRYPOINT ["/tini", "-g", "--"]
158+
CMD ["start", "web"]
Collapse file

‎py3.11-slim-trixie/add_addons_dev_to_syspath.py‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# adds all directories in /app/addons-dev to sys.path
2+
import os
3+
import sys
4+
5+
6+
base_path = os.environ.get('ADDONS_DEV_PATH', '/app/addons-dev')
7+
8+
9+
if os.path.exists(base_path):
10+
all_directories_in_base_path = next(os.walk(base_path))[1]
11+
for pkg in sorted(all_directories_in_base_path, reverse=True):
12+
# sorted in reverse so they end up in alphabetical order (insert(0)
13+
# reverses the order)
14+
pkg_dir = os.path.join(base_path, pkg)
15+
if pkg_dir not in sys.path:
16+
sys.path.insert(0, pkg_dir)
Collapse file

‎py3.12-slim-trixie/CHANGELOG.rst‎

Copy file name to clipboard
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changelog
2+
=========
3+
4+
1.0 (2025-08-19)
5+
----------------
6+
7+
* Initial release of Python 3.12 / Debian Trixie base image.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.