**DO NOT USE** Old versions of Python, just for experiments.
179
DO NOT USE IN PRODUCTION
Here are old python images for experiments ONLY.
For Python 2.0, to compile a Python file, use the following command:
docker run --rm -it -v ${PWD}:/app ajabep/oldpython:2.0 /cpython/Lib/compileall.py /app/
Here is my dockerfile. Note that I'll probably not maintain these images. Also, of course, please, update the version in the git checkout line to compile another version.
# Compile Python 2.0
FROM alpine:3 AS builder
RUN apk add --no-cache \
git=2.40.1-r0 \
make=4.4.1-r1 \
autoconf=2.71-r2 \
gcc=12.2.1_git20220924-r10 \
g++=12.2.1_git20220924-r10
RUN git clone https://github.com/python/cpython
WORKDIR /cpython
# The sed command is a patch taken from https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-extended/slang/slang/0001-Fix-error-conflicting-types-for-posix_close.patch?h=morty
RUN git checkout 2.0 \
&& sed 's/posix_close/posix_closex/g' -i Modules/posixmodule.c \
&& ./configure \
&& make
FROM alpine:3
COPY --from=builder /cpython /cpython
ENTRYPOINT [ "/cpython/python" ]
Content type
Image
Digest
sha256:f7124b642…
Size
540.1 MB
Last updated
about 3 years ago
docker pull ajabep/oldpython:2.2.3