Sign inSign up

sirmark/python

By sirmark

•Updated about 21 hours ago

Python Alpine Docker image with glibc packages.

Image
Languages & frameworks
1

1.3K

sirmark/python repository overview

⁠Python Docker image with Alpine-glibc

This image based on Python⁠ official image, and contains glibc to enable proprietary projects compiled against glibc work on Alpine.

This image includes some quirks to make glibc⁠ work side by side with musl libc (default in Alpine Linux). glibc packages for Alpine Linux are prepared by Sasha Gerrand⁠ and the releases are published in sgerrand/alpine-pkg-glibc⁠ github repo.

If you need to update your libc library cache, use /usr/glibc-compat/sbin/ldconfig instead of the usual /sbin/ldconfig. You can also use the LD_LIBRARY_PATH as on standard libc-based distributions.

No latest tag, please use specific version tags.

⁠Docker Pull Command

docker pull sirmark/python:3.15-alpine-glibc2.44

⁠Usage Example

Pull and run.

$ docker pull sirmark/python:3.15-alpine-glibc2.44
$ docker run --rm -it sirmark/python:3.15-alpine-glibc2.44

Use in your Dockerfile, writing something along the lines of the following will compile and run your project:

FROM sirmark/python:3.15-alpine-glibc2.44

WORKDIR /myapp

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["python", "./your-daemon-or-script.py"]

Then, build and run the Docker image:

$ docker build -t my-python-app .
$ docker run -it --rm --name my-running-app my-python-app

Tag summary

Content type

Image

Digest

sha256:21aa46671…

Size

27.2 MB

Last updated

about 21 hours ago

docker pull sirmark/python:3.15-alpine-glibc2.44