|
| 1 | +# Bindu Runtime Base Image |
| 2 | + |
| 3 | +A minimal, multi-runtime base image for Bindu agents, combining Python 3.12 (via uv) and Node.js 22 on Debian Bookworm. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Python 3.12**: Installed via [uv](https://github.com/astral-sh/uv) for fast, reliable Python management |
| 8 | +- **Node.js 22**: Latest LTS version with npm and npx |
| 9 | +- **Minimal footprint**: Based on `debian:bookworm-slim` with only essential runtime dependencies |
| 10 | +- **Multi-stage build**: Optimized layer caching and smaller final image size |
| 11 | +- **OCI compliant**: Proper labels and metadata |
| 12 | + |
| 13 | +## Image Details |
| 14 | + |
| 15 | +- **Base OS**: Debian Bookworm (slim) |
| 16 | +- **Python**: 3.12 (managed by uv) |
| 17 | +- **Node.js**: 22.x |
| 18 | +- **Working Directory**: `/app` |
| 19 | + |
| 20 | +## Usage |
| 21 | + |
| 22 | +### Pull the image |
| 23 | + |
| 24 | +```bash |
| 25 | +docker pull ghcr.io/getbindu/bindu-base:latest |
| 26 | +# or specific version |
| 27 | +docker pull ghcr.io/getbindu/bindu-base:1.0.0 |
| 28 | +``` |
| 29 | + |
| 30 | +### Use as base image |
| 31 | + |
| 32 | +```dockerfile |
| 33 | +FROM ghcr.io/getbindu/bindu-base:1.0.0 |
| 34 | + |
| 35 | +# Your agent-specific setup |
| 36 | +COPY requirements.txt . |
| 37 | +RUN pip install -r requirements.txt |
| 38 | + |
| 39 | +COPY package.json . |
| 40 | +RUN npm install |
| 41 | + |
| 42 | +# ... rest of your Dockerfile |
| 43 | +``` |
| 44 | + |
| 45 | +## Building & Publishing |
| 46 | + |
| 47 | +### Prerequisites |
| 48 | + |
| 49 | +- Docker installed and running |
| 50 | +- Authenticated to GitHub Container Registry: |
| 51 | + ```bash |
| 52 | + echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin |
| 53 | + ``` |
| 54 | + |
| 55 | +### Build Commands |
| 56 | + |
| 57 | +```bash |
| 58 | +# Build the image |
| 59 | +make build |
| 60 | + |
| 61 | +# Build and push versioned image |
| 62 | +make push |
| 63 | + |
| 64 | +# Tag and push as latest |
| 65 | +make tag-latest |
| 66 | + |
| 67 | +# Build and push both versioned and latest |
| 68 | +make all |
| 69 | + |
| 70 | +# Clean up local images |
| 71 | +make clean |
| 72 | +``` |
| 73 | + |
| 74 | +### Version Management |
| 75 | + |
| 76 | +Update the version in `Makefile`: |
| 77 | + |
| 78 | +```makefile |
| 79 | +VERSION := 1.0.0 # Change this for new releases |
| 80 | +``` |
| 81 | +
|
| 82 | +## Architecture |
| 83 | +
|
| 84 | +The Dockerfile uses a multi-stage build: |
| 85 | +
|
| 86 | +1. **uv-base**: Installs Python 3.12 using uv |
| 87 | +2. **node-base**: Provides Node.js 22 binaries |
| 88 | +3. **Final stage**: Combines both runtimes on minimal Debian base |
| 89 | +
|
| 90 | +This approach ensures: |
| 91 | +- Clean separation of build dependencies |
| 92 | +- Smaller final image (no build tools included) |
| 93 | +- Efficient layer caching |
| 94 | +
|
| 95 | +## Python Environment |
| 96 | +
|
| 97 | +Python is available globally at `/python/bin/python`. Each agent should create its own virtual environment: |
| 98 | +
|
| 99 | +```bash |
| 100 | +python -m venv /app/venv |
| 101 | +source /app/venv/bin/activate |
| 102 | +``` |
| 103 | + |
| 104 | +## Node.js Environment |
| 105 | + |
| 106 | +Node.js, npm, and npx are available globally: |
| 107 | + |
| 108 | +```bash |
| 109 | +node --version # v22.x.x |
| 110 | +npm --version |
| 111 | +``` |
| 112 | + |
| 113 | +## License |
| 114 | + |
| 115 | +Maintained by Bindu team. |
| 116 | + |
| 117 | +## Contact |
| 118 | + |
| 119 | +**Author**: Raahul Dutta <raahul@getbindu.com> |
0 commit comments