Skip to content

Installation

Mimic ships as a Docker image. That’s the recommended way to run it for almost every use case. Building from source is supported but only needed if you’re contributing to Mimic itself.

Terminal window
docker run -d \
--name mimic \
-p 8080:8080 \
-v $(pwd)/mocks:/app/mocks:ro \
ragilhadi/mimic:latest
Terminal window
# Latest stable
docker pull ragilhadi/mimic:latest
# Pin to a specific version
docker pull ragilhadi/mimic:v1.0.0

Images are published for linux/amd64 and linux/arm64, so they run natively on Apple Silicon, Raspberry Pi, and most cloud VMs.

You only need this path if you’re contributing to Mimic or you want a custom build.

  • Rust 1.70 or later — install via rustup
  • make (optional, for convenience commands)
  1. Clone the repository.

    Terminal window
    git clone https://github.com/ragilhadi/mimic.git
    cd mimic
  2. Build a release binary.

    Terminal window
    cargo build --release

    The compiled binary will be at target/release/mimic.

  3. Run it.

    Terminal window
    ./target/release/mimic

    By default Mimic reads mocks from ./mocks and listens on port 8080.

For iterating on the Mimic codebase itself:

Terminal window
make dev # run in debug mode with verbose logging
make watch # auto-rebuild and restart on file changes
make test # run the test suite

See the Makefile commands in the repo for the full list.

Whichever method you used, confirm Mimic is up:

Terminal window
curl http://localhost:8080/health

You should get:

{
"status": "healthy",
"mocks_loaded": 0,
"service": "mimic"
}

If mocks_loaded is 0 and you weren’t expecting it to be, check that your mocks folder is mounted correctly and contains valid JSON files. See Mock Files for the file format.