milvus-logo
LFAI
Home
  • Get Started

Run Milvus with Docker Compose

This page illustrates how to launch a Milvus instance in Docker using Docker Compose.

Prerequisites

Install Milvus

Milvus provides a Docker Compose configuration file in the Milvus repository. To install Milvus using Docker Compose, just run

# Download the configuration file
$ wget https://github.com/milvus-io/milvus/releases/download/v2.4.5/milvus-standalone-docker-compose.yml -O docker-compose.yml

# Start Milvus
$ sudo docker compose up -d

Creating milvus-etcd  ... done
Creating milvus-minio ... done
Creating milvus-standalone ... done
  • If you failed to run the above command, please check whether your system has Docker Compose V1 installed. If this is the case, you are advised to migrate to Docker Compose V2 due to the notes on this page.

  • If you encounter any issues pulling the image, contact us at community@zilliz.com with details about the problem, and we'll provide you with the necessary support.

After starting up Milvus,

  • Containers named milvus-standalone, milvus-minio, and milvus-etcd are up.
    • The milvus-etcd container does not expose any ports to the host and maps its data to volumes/etcd in the current folder.
    • The milvus-minio container serves ports 9090 and 9091 locally with the default authentication credentials and maps its data to volumes/minio in the current folder.
    • The milvus-standalone container serves ports 19530 locally with the default settings and maps its data to volumes/milvus in the current folder.

You can check if the containers are up and running using the following command:

$ sudo docker compose ps

      Name                     Command                  State                            Ports
--------------------------------------------------------------------------------------------------------------------
milvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp
milvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
milvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp

You can stop and delete this container as follows

# Stop Milvus
$ sudo docker compose down

# Delete service data
$ sudo rm -rf volumes

What's next

Having installed Milvus in Docker, you can: