Overview
Junkie includes a production-ready Dockerfile using a multi-stage build process with Python 3.12 and theuv package manager for fast, efficient builds.
Dockerfile
The application uses a two-stage Docker build:Building the Image
Basic Build
Build the Docker image with default settings:Build with Cache
The Dockerfile uses BuildKit cache mounts for faster rebuilds:Build for Specific Platform
Build for a specific platform (e.g., for deployment on different architectures):Running the Container
Basic Run
Run Junkie with environment variables from a.env file:
Run with Custom Configuration
Pass environment variables directly:Run in Detached Mode
Run the container in the background:View Logs
Check container logs:Docker Compose (Optional)
Create adocker-compose.yml for easier management:
CI/CD Integration
The project includes GitHub Actions workflow for automated builds. See.github/workflows/main.yml for the complete configuration.
Key Features
- Automated builds on push to
mainandteambranches - Docker layer caching via Blacksmith
- Multi-platform support (linux/amd64)
- Automatic image tagging (latest, branch, SHA)
- Integration with Coolify for automated deployments
Image Optimization
Multi-Stage Build Benefits
- Smaller Final Image: Build dependencies (git, uv) are excluded from the final image
- Layer Caching: Dependencies are cached separately from application code
- Fast Rebuilds: Only changed layers are rebuilt
Dependencies
The image includes all dependencies fromrequirements.txt, including:
agno- Agent frameworkopenai>=1.77.0- OpenAI SDKarize-phoenix- Phoenix tracingdiscord.py-self- Discord integratione2b_code_interpreter- Code executionpsycopg2-binary- PostgreSQL support- And more (see requirements.txt)
Troubleshooting
Build Fails with Git Dependency
The Dockerfile installsgit to handle Git-based dependencies in requirements.txt (like discord.py-self).
If you encounter issues:
Container Exits Immediately
Check logs for errors:- Missing required environment variables
- Invalid database connection string
- Missing API keys