Sign inSign up

romanirinarkhov/python311-saml-build

By romanirinarkhov

Updated about 1 year ago

Lightweight Python 3.11 + xmlsec/lxml build deps (Debian 12)

Image
Security
Languages & frameworks
0

87

romanirinarkhov/python311-saml-build repository overview

🐍 python311-xmlsec-build

  • Best-of-both: base image for building lxml/xmlsec with Python 3.11 (Debian 12)
  • This image provides a lightweight foundation for Python applications that require XML and cryptographic libraries such as lxml and xmlsec.
  • It is based on python:3.11-slim-bookworm and includes only the minimal system dependencies needed to build C extensions.

🔹 Features

  • Python 3.11 on Debian 12 (slim/bookworm)

  • Preinstalled system libraries:

  • libxml2-dev, libxslt1-dev, zlib1g-dev

  • libxmlsec1-dev, libxmlsec1-openssl

  • libssl-dev, libffi-dev

  • build-essential, pkg-config

  • Environment variables tuned for smaller images & better logging:

  • PYTHONDONTWRITEBYTECODE=1

  • PYTHONUNBUFFERED=1

  • PIP_NO_CACHE_DIR=1

  • PIP_DISABLE_PIP_VERSION_CHECK=1

  • Pre-upgraded pip, setuptools, wheel

🔹 Usage

  • FROM romanirinarkhov/python311-xmlsec-build:1.0.1
  • WORKDIR /app
  • COPY requirements.txt .
  • RUN pip install -r requirements.txt
  • COPY . .
  • CMD ["python", "app.py"]

Build & run:

  • docker build -t myapp .
  • docker run --rm -it myapp

🔹 When to use

  • This base image is optimized for:
  • Projects using FastAPI, Flask, or Django with XML security requirements
  • Services needing SAML, SOAP, or XML signature verification
  • Any Python app requiring lxml / xmlsec compiled against system libs

Tag summary

Content type

Image

Digest

sha256:dcecb403d

Size

187.7 MB

Last updated

about 1 year ago

docker pull romanirinarkhov/python311-saml-build:1.0.0