Install Milvus Cluster with Docker Compose

This topic introduces how to deploy a Milvus cluster with Docker Compose.

Docker Compose cannot deploy Milvus distributed clusters across machines, and can only be used in test environments. It is not recommended that you deploy Milvus distributed clusters in this way in production environments.


Check the requirements for hardware and software prior to your installation.

Download an installation file

Download milvus-cluster-docker-compose.yml directly or with the following command, and save it as docker-compose.yml.

$ wget -O docker-compose.yml

Start Milvus

$ sudo docker-compose up -d
Docker Compose is now in the Docker CLI, try `docker compose up`
Creating milvus-etcd   ... done
Creating milvus-minio  ... done
Creating milvus-pulsar ... done
Creating milvus-proxy      ... done
Creating milvus-rootcoord  ... done
Creating milvus-indexcoord ... done
Creating milvus-querycoord ... done
Creating milvus-datacoord  ... done
Creating milvus-querynode  ... done
Creating milvus-indexnode  ... done
Creating milvus-datanode   ... done

Check the status of the containers.

$ sudo docker ps

After Milvus cluster starts, 11 running docker containers appear including three dependencies and eight Milvus services.

      Name                     Command                  State                          Ports
milvus-datacoord    /tini -- milvus run datacoord    Up
milvus-datanode     /tini -- milvus run datanode     Up
milvus-etcd         etcd -listen-peer-urls=htt ...   Up (healthy)   2379/tcp, 2380/tcp
milvus-indexcoord   /tini -- milvus run indexcoord   Up
milvus-indexnode    /tini -- milvus run indexnode    Up
milvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
milvus-proxy        /tini -- milvus run proxy        Up   >19530/tcp,:::19530->19530/tcp
milvus-pulsar       bin/pulsar standalone            Up
milvus-querycoord   /tini -- milvus run querycoord   Up
milvus-querynode    /tini -- milvus run querynode    Up
milvus-rootcoord    /tini -- milvus run rootcoord    Up

Stop Milvus

To stop Milvus cluster, run $ sudo docker-compose down.

To delete data after stopping Milvus, run $ sudo rm -rf volumes.

What's next

Having installed Milvus, you can:


Was this page helpful?