Docker image for CookCLI, a CLI tool for managing Cooklang recipes with a built-in web server.
- 🐳 Multi-architecture support:
linux/amd64andlinux/arm64 - 🔒 Non-root user (UID/GID 1000:1000)
- 🏔️ Based on Alpine Linux for minimal size
- ✅ Built-in health check
- 🔄 Automatic version detection (always uses latest CookCLI release)
- 📦 Automatic updates when new CookCLI versions are released
- 🎯 OCI compliant labels
Create a compose.yaml file:
services:
cookcli:
container_name: cookcli
deploy:
resources:
limits:
cpus: 0.10
memory: 32M
image: inigochoa/cookcli:latest
ports:
- 9080:9080
restart: unless-stopped
volumes:
- ./recipes:/recipes
Then run:
docker compose up -ddocker run -d \
--name cookcli \
-p 9080:9080 \
-v $(pwd)/recipes:/recipes \
--cpus="0.10" \
--memory="32m" \
--restart unless-stopped \
inigochoa/cookcli:latestOnce running, access the web interface at:
http://localhost:9080
Place your .cook recipe files in the ./recipes directory (or whichever
directory you mounted as a volume).
The container exposes port 9080 by default. You can map it to any host port:
ports:
- "8080:9080" # Access on http://localhost:8080Mount your recipes directory to /recipes inside the container:
volumes:
- /path/to/your/recipes:/recipesThe container runs as user 1000:1000. Ensure your recipe files have
appropriate permissions:
chown -R 1000:1000 ./recipesTo prevent the container from consuming excessive system resources, you can set CPU and memory limits.
deploy:
resources:
limits:
cpus: '0.10' # 10% of 1 CPU
memory: 32M # 32MB RAMdocker run -d \
--cpus="0.10" \
--memory="32m" \
...# Real-time resource monitoring
docker stats cookcli
# Current usage snapshot
docker stats --no-stream cookclilatest- Latest stable version of CookCLI0.18.1- Specific version tags0.18- Minor version tags0- Major version tags
The image includes a built-in health check that verifies the HTTP server is responding:
- Interval: 30 seconds
- Timeout: 3 seconds
- Start period: 5 seconds
- Retries: 3
- Docker with BuildKit support
- Docker Buildx (for multi-architecture builds)
./build.sh buildVERSION=0.18.1 ./build.sh build./build.sh test# Login first
docker login
# Publish latest version
./build.sh publish
# Or publish specific version
VERSION=0.18.0 ./build.sh publishThis image uses a multi-stage build process:
- Downloader stage: Automatically fetches the latest CookCLI release from GitHub (or uses a specified version), downloads and extracts the appropriate binary for the target architecture
- Final stage: Minimal Alpine-based image with only the binary and runtime dependencies
The version is determined at build time:
- If no
VERSIONis specified, it automatically queries GitHub API for the latest release - If
VERSIONis specified, it uses that exact version
- Runs as non-root user (UID/GID 1000)
- Minimal attack surface (Alpine base)
- No unnecessary packages installed
- Automatic security updates via automated builds
This Docker image is licensed under the MIT License. See LICENSE for details.
CookCLI itself is licensed under its own terms. See the CookCLI repository for more information.
Issues and pull requests are welcome at inigochoa/cookcli-docker.
- CookCLI: https://github.com/cooklang/cookcli
- Cooklang: https://cooklang.org/
- Docker Hub: https://hub.docker.com/r/inigochoa/cookcli
- GitHub: https://github.com/inigochoa/cookcli-docker
- CookCLI Documentation: https://cooklang.org/cli/help/