Python Curated Images
Hardened Python images based on alpine:3.19. Designed specifically for FastAPI and Django applications that require a balance between security and compatibility.
Images
| Framework | Tag | Base | Size |
|---|---|---|---|
| Django | securescale/django-6.0:python-3.1.2 | alpine:3.19 | ~132MB |
| FastAPI | securescale/python:fastapi-3.11 | alpine:3.19 | ~45MB |
Quick Start for Django
Follow these steps to containerize your Django application using our hardened images.
1. Create Dockerfile
Save the following content as Dockerfile in your project root.
# Use the hardened Django image
FROM securescale/django-6.0:python-3.1.2
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN python3 -m pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . /app
COPY entrypoint.py /entrypoint.py
# Set entrypoint and default command
ENTRYPOINT ["python3", "/entrypoint.py"]
CMD ["manage.py", "runserver", "0.0.0.0:8000"]Security Features
- Minimal base image: Distroless image (reduced attack surface).
- Non-root access: Default user is
nonroot(UID 65532). - No SSH inside container: Container does not expose SSH or shell access by default
- Immutable image: Image built once and reused (no manual changes in runtime)