Skip to main content
The repository includes a multi-stage Dockerfile. The runtime image contains the Simile binary, CA certificates, a non-root user, /workspace for service sources, and /var/lib/simile as SIMILE_HOME. Docker helps when the application tests already run in containers or the CI platform standardizes on container jobs. Native installation with simile test is the shortest path for ordinary local and CI runs.

Build the image

From the Simile repository:
The build uses Rust 1.85 and compiles the release binary with the locked dependency graph.

Start a service from a Simfile

Mount the service project at /workspace, publish its listener, and override the configured host so the port is reachable outside the container:
The container loads /workspace/Simfile. Relative contract and module paths resolve from that directory.

Preserve service state

Mount a named volume at /var/lib/simile when registrations, profiles, resources, and replay state should survive a container restart:
Use a disposable volume in CI for clean state. The volume can contain issued credentials, so keep it private and delete it with the job.

Connect an application container

Put the emulator and application test container on one Docker network:
One emulator process serves one Simfile. Launch one container per external provider when a test environment needs several services. Container orchestration can assign a stable network name to each emulator while every service keeps its own SIMILE_HOME volume. For a single-process job with automatic readiness and cleanup, install Simile in the application test image and run simile test -- COMMAND there. See CI testing for that lifecycle.