The June 2025 Learning Lab with Patrick Smyth covers Chainguard Libraries for
Python. Open source libraries help you move fast, but pulling in external
dependencies can introduce supply chain risk. This session covers fundamental
concepts of Chainguard Libraries, package managers and dependencies, PyPI and
build tools, configuring repository managers, and running example application builds.
40:25 Demo: Building and running containerized Flask application
41:41 Additional configuration options and documentation resources
42:19 Q&A: Repository manager setup and configuration
43:26 Q&A: Architecture support and glibc requirements
44:34 Q&A: libCheck tool open source plans and detailed output
46:05 Q&A: CVE scanning with Grype and vulnerability management
Demo
In the demo, we switch a Flask application to use Chainguard Libraries for Python, sourcing dependencies from a repository manager (Artifactory) set up to pull first from the Chainguard Libraries for Python index with a fallback to the Python Package Index (PyPI).
We demonstrate two approaches. First, we modify the ~/.pip/pip.conf file to pull from the virtual repository set up in the repository manager:
[global]
index-url = <repository-url>
After changing this global setting, we install and run the application from a virtual environment, then use Chainguard’s libCheck tool to test the provenance of the packages in the virtual environment. Chainguard is in the process of releasing this tool under an open source license.
We also update the demo application’s requirements.txt file and build and run the application from a Chainguard Container.