Docker¶
Running a containerised service with volumes, ports, and networking.
Recipe¶
examples/krill-docker.yaml
version: "1"
name: robot
log_dir: ~/.krill/logs
services:
my-service:
execute:
type: docker
image: "nginx:latest"
volumes:
- "./docker:/container/app"
ports:
- "8080:80"
privileged: false
network: "bridge"
Running¶
Open http://localhost:8080 to see nginx running.
Key Concepts¶
type: docker— Krill managesdocker runfor you.volumes— mount host paths into the container (host:containerorhost:container:ro).ports— publish container ports to the host.network— set the Docker network mode (bridge,host, or a named network).privileged— enable privileged mode for hardware access (use with care).
Docker services can be mixed with any other executor type in the same recipe — see the ROS2 Navigation example for a combined setup.