The Docker-based dev environment is the fastest way to a working Mina build on any host OS, and pins the same toolchain CI uses — so you won't hit "works on my machine" drift between local and CI.
If you're choosing between this and native install, prefer this one unless you have a specific reason to install OCaml/opam/Rust/Go on the host directly.
- Docker (with the
docker composev2 subcommand). - ~10 GB of free disk for the toolchain image + the opam switch volume.
- Optional: VS Code with the Dev Containers extension for the IDE path.
cd dev
make # pulls the toolchain image, boots the container
# in a second terminal:
make ssh # drops you into the container as `opam`, in /mina
# inside the container:
eval "$(opam config env)"
make build # build the daemonFiles you edit on the host are live in the container at /mina, and
files the container writes back to your source tree are owned by your
host user — no sudo chown step.
cd dev
make devcontainer # generates .devcontainer/mina/ (gitignored)Then in VS Code: Command Palette → Dev Containers: Reopen in
Container → Mina toolchain (non-Nix). The integrated terminal lands
you in /mina as opam with OCaml LSP / jump-to-def working.
- The same toolchain image CI builds against
(
docker.io/minaprotocol/mina-toolchain), pinned to a recent CI commit. - Host UID/GID remapping at container boot, so writes from inside the container come out owned by you on the host.
- Named volumes for
.opam,_opam,_buildso the switch and build cache survive container restarts.
For the full reference (overriding the image tag, troubleshooting first-boot
slowness, JetBrains / Neovim flows), see
dev/README.md.
- Setup on Linux (native) — install the toolchain directly on the host (best-effort; can drift from CI).
- Setup on macOS (native)
- Build Mina with Nix — also reproducible; manages the C library + OCaml dependency matrix declaratively.