Minimal Docker image for the Emergent event-driven workflow engine.
# Create directories and config
mkdir -p config data run
cp emergent.toml.example config/emergent.toml
# Run with docker-compose
docker-compose up- Base: Alpine Linux 3.21
- Size: ~20MB
- User: Non-root
emergentuser (UID 1000) - Binary: Statically linked with musl
| Mount Point | Purpose | Mode |
|---|---|---|
/etc/emergent |
Configuration files | Read-only |
/var/lib/emergent |
Events DB + JSON logs | Read-write |
/run/emergent |
IPC socket directory | Read-write |
Copy emergent.toml.example to config/emergent.toml and customize:
[engine]
name = "emergent"
socket_path = "/run/emergent/emergent.sock"
[event_store]
json_log_dir = "/var/lib/emergent/logs"
sqlite_path = "/var/lib/emergent/events.db"
retention_days = 30Primitives (sources, handlers, sinks) can connect to the containerized engine via the shared socket:
EMERGENT_SOCKET=./run/emergent.sock ./my-primitiveservices:
my-primitive:
volumes:
- ./run:/run/emergent
environment:
- EMERGENT_SOCKET=/run/emergent/emergent.sock# From repository root
docker build -t emergent:local -f docker/Dockerfile .
# Check image size
docker images emergent:local| Variable | Default | Description |
|---|---|---|
RUST_LOG |
info |
Log level (trace, debug, info, warn, error) |
# Pull from GHCR (after pushing)
docker pull ghcr.io/govcraft/emergent:latest
docker pull ghcr.io/govcraft/emergent:0.5.0The container includes a healthcheck that verifies the engine process is running:
healthcheck:
test: ["CMD", "pgrep", "-x", "emergent"]
interval: 30s
timeout: 10s
retries: 3Engine won't start:
- Verify config file exists at
config/emergent.toml - Check logs:
docker-compose logs
Socket permission issues:
- Ensure
run/directory is writable - Check UID/GID mapping if using user namespaces
Database errors:
- Ensure
data/directory is writable - Check disk space