Docker
Run Miravo in Docker with multi-arch images, Docker Compose examples, environment variables, volume mounts, health probes, and Kubernetes readiness checks.
Miravo publishes multi-arch Docker images for linux/amd64 and linux/arm64.
Images
Section titled “Images”| Registry | Image |
|---|---|
| Docker Hub | amineamaach/miravo:latest |
| GitHub Container Registry | ghcr.io/amine-amaach/miravo:latest |
Pin a version tag: amineamaach/miravo:0.3.0
Quick Run
Section titled “Quick Run”docker run --rm -p 1883:1883 -p 8080:8080 amineamaach/miravo:latestWith a specific template:
docker run --rm -p 1883:1883 -p 8080:8080 \ amineamaach/miravo:latest start --template water-treatmentWith OPC UA:
docker run --rm -p 1883:1883 -p 4840:4840 -p 8080:8080 \ amineamaach/miravo:latest start --template smart-factory --opcuaDocker Compose
Section titled “Docker Compose”services: miravo: image: amineamaach/miravo:latest init: true command: ["--log-format", "json", "start"] environment: MIRAVO_ADMIN_HOST: 0.0.0.0 MIRAVO_ADMIN_PORT: 8080 ports: - "1883:1883" - "8080:8080" read_only: true tmpfs: - /tmp:size=256m security_opt: - no-new-privileges:true cap_drop: - ALL stop_grace_period: 30s healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/healthz > /dev/null || exit 1"] interval: 30s timeout: 5s retries: 3 start_period: 20s restart: "on-failure:5" logging: driver: json-file options: max-size: "10m" max-file: "5" deploy: resources: limits: cpus: "4" memory: 4GExposed Ports
Section titled “Exposed Ports”| Port | Protocol | Description |
|---|---|---|
1883 | MQTT | Embedded broker (when MQTT enabled) |
4840 | OPC UA | OPC UA server (when --opcua enabled) |
8080 | HTTP | Admin API and web console |
Environment Variables
Section titled “Environment Variables”Set any MIRAVO_* variable in environment:
environment: MIRAVO_ADMIN_HOST: 0.0.0.0 MIRAVO_ADMIN_PORT: 8080 MIRAVO_MQTT_PORT: 1883 MIRAVO_NAME: my-simulation MIRAVO_TEMPLATE: water-treatmentSee Environment Variables for the full reference.
Custom Content
Section titled “Custom Content”Mount custom models or templates into the container:
volumes: - ./my-models:/app/custom-models:rocommand: ["start", "--template", "/app/custom-models/my-plant.miravo.yaml"]Or use the local registry:
volumes: - ./miravo-data:/data/miravoenvironment: MIRAVO_HOME: /data/miravoHealth Probes
Section titled “Health Probes”The container includes a built-in health check:
| Endpoint | Use | Healthy |
|---|---|---|
GET /healthz | Liveness probe | Engine running, tick loop progressing |
GET /readyz | Readiness probe | Engine running + all enabled adapters connected |
Kubernetes example:
livenessProbe: httpGet: path: /healthz port: 8080 initialDelaySeconds: 20 periodSeconds: 30readinessProbe: httpGet: path: /readyz port: 8080 initialDelaySeconds: 20 periodSeconds: 10Security
Section titled “Security”The default image runs as a non-root user (miravo, UID 10001). The Compose profile adds:
read_only: true— Read-only root filesystemcap_drop: ALL— Drop all Linux capabilitiesno-new-privileges— Prevent privilege escalationtmpfsat/tmpfor runtime scratch space