Basic image with tooling installed required to build various versions of Python.
1.2K
Basic image with tooling installed required to build various versions of Python.
1.0.0, 1.0, 1, latest, 1.0.0-alpine, 1.0-alpine, 1-alpine, alpine1.0.0-debian, 1.0-debian, 1-debian, debain1.0.0-ubuntu, 1.0-ubuntu, 1-ubuntu, ubuntuThis image is intended to be used as the first stage of a multi-stage build. For example:
FROM dubzland/python-builder:1.0-alpine as build
ARG PYTHON_VERSIONS="3.10 3.11 3.12"
RUN build-python-versions -o /tmp/ $PYTHON_VERSIONS
FROM alpine:3.19
ENV PATH /usr/local/bin:$PATH
COPY --from=build /tmp/python-all.tar.gz /tmp/python.tar.gz
RUN tar -C / -xzf /tmp/python-all.tar.gz && \
rm /tmp/python.tar.gz
Once the image is built, Pythons will be installed in /usr/local/bin. The
binaries are installed as pythonX.Y.
To fully enable the execution of Python in the resulting image (including building additional modules), ensure the required packages are installed:
apk add --no-cache bash ca-certificates curl gcc git libexpat libffi-dev \
musl-dev sqlite-libs yaml-dev
apt-get install -y --no-install-recommends gcc gnupg2 libbz2-dev libgdbm-dev \
libgdbm-compat-dev libffi-dev liblzma-dev libncurses-dev libreadline-dev \
libsqlite3-dev libssl-dev tk-dev uuid-dev
sudo apt-get install -y --no-install-recommends build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev
Depending on the exact release of the operating system, these lists may differ slightly.
MIT
Content type
Image
Digest
sha256:83d92c12b…
Size
97.6 MB
Last updated
over 1 year ago
docker pull dubzland/python-builder