django-base image provides a foundation for building Django applications with pre-configured Python environments and dependency management tools.
Supported Python Versions
Penn Labs products use different Python versions depending on compatibility requirements. Eachdjango-base release includes both “Shared” and “Simple” tags:
- Shared tag:
[sha]- Uses the default Python version - Simple tag:
[sha]-[python-version]- Explicitly specifies Python version
Available Tags
| Tag Pattern | Python Version | Used By |
|---|---|---|
[sha] | Python 3.11 (default) | Default for new projects |
[sha]-3.11 | Python 3.11 | office-hours-queue, penn-mobile, penn-courses |
[sha]-3.10 | Python 3.10.18 | Legacy projects |
Example Tag
For a commit SHAa142aa6975ee293bbc8a09ef0b81998ce7063dd3:
- Shared tag:
a142aa6975ee293bbc8a09ef0b81998ce7063dd3 - Simple tag (Python 3.10):
a142aa6975ee293bbc8a09ef0b81998ce7063dd3-python3.10
Features
The Django base image includes:- pipenv for dependency management
- mysqlclient packages and necessary dependencies
- Pre-configured Python environment
- Optimized for Django applications
Usage Example
Create aDockerfile for your Django application:
Build Arguments
Thedjango-base image supports the PYTHON_VERSION build argument to specify the Python version:
3.10 if not specified.