Run Milvus in Docker (Linux)
This page illustrates how to launch a Milvus instance in Docker.
Prerequisites
- Install Docker.
- Check the requirements for hardware and software prior to your installation.
Install Milvus in Docker
Milvus provides an installation script to install it as a Docker container. The script is available in the Milvus repository. Download and inspect the script before starting a new deployment:
# Download the installation script
$ curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh
# Inspect the Docker image selected by the script
$ grep -n "milvusdb/milvus:" standalone_embed.sh
# Start the Docker container
$ bash standalone_embed.sh start
The script is downloaded from the Milvus master branch. Its Docker image tag is defined in the script and can differ from v3.0.5. To install that exact release, use the versioned configuration in Run Milvus with Docker Compose.
This Docker deployment runs Woodpecker with the local filesystem as its WAL backend, so no external message-queue service is required. See Woodpecker.
If you want to use Backup in standalone deployment mode, it is recommended to use the Docker Compose deployment method.
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 running the installation script:
- A docker container named milvus-standalone has been started at port 19530.
- An embed etcd is installed along with Milvus in the same container and serves at port 2379. Its configuration file is mapped to embedEtcd.yaml in the current folder.
- To change the default Milvus configuration, add your settings to the user.yaml file in the current folder and then restart the service.
- The Milvus data volume is mapped to volumes/milvus in the current folder.
Verify the actual image and health status:
docker inspect --format '{{.Config.Image}}' milvus-standalone
docker inspect --format '{{.State.Health.Status}}' milvus-standalone
Wait for healthy before following Quickstart. When using this server, connect the SDK to http://localhost:19530; a local .db URI starts Milvus Lite instead.
You can access Milvus WebUI at http://127.0.0.1:9091/webui/ to learn more about the your Milvus instance. For details, refer to Milvus WebUI.
(Optional) Update Milvus configurations
You can modify the Milvus configurations in the user.yaml file in the current folder. For example, to change the proxy.healthCheckTimeout to 1000 ms, you can modify the file as follows:
cat << EOF > user.yaml
# Extra config to override default milvus.yaml
proxy:
healthCheckTimeout: 1000 # ms, the interval that to do component healthy check
EOF
Then restart the service as follows:
$ bash standalone_embed.sh restart
For applicable configuration items, refer to System Configuration.
Upgrade Milvus
The script’s upgrade command downloads the script from master and recreates the container using the image selected by that script. It does not validate a supported source-to-target version path and can recreate generated configuration files. Do not treat it as a guarantee that an arbitrary older deployment can upgrade safely to v3.0.5.
Before an upgrade, back up metadata, persistent data, embedEtcd.yaml, and user.yaml. Check the target version, message queue, and storage compatibility, and validate recovery in a non-production environment. For deployments managed with Docker Compose, follow Upgrade Milvus Standalone with Docker Compose; do not apply that procedure directly to a script-managed container.
Stop and delete Milvus
You can stop and delete this container as follows
# Stop Milvus
$ bash standalone_embed.sh stop
# Delete Milvus data
$ bash standalone_embed.sh delete
Optional dependencies
By default this deployment runs Woodpecker (local-filesystem WAL) as the message queue and an embedded etcd for metadata — nothing else to install. To use a different message queue or connect external object storage / metadata, see:
- Message queue: Woodpecker (default) · Pulsar · Kafka · RocksMQ
- Object storage: MinIO (default) · AWS S3 · Azure Blob · GCP Cloud Storage · Aliyun OSS · Tencent COS · Huawei OBS · S3-compatible
- Metadata: etcd
Storage V3 is disabled by default. Enable it before using features that depend on it. For requirements and compatibility considerations, see Storage V3.
What’s next
Having installed Milvus in Docker, you can:
Check Quickstart to see what Milvus can do.
Learn the basic operations of Milvus:
Review the upgrade considerations on this page before changing the Milvus version.
Deploy your Milvu cluster on clouds:
Explore Milvus WebUI, an intuitive web interface for Milvus observability and management.
Explore Milvus Backup, an open-source tool for Milvus data backups.
Explore Birdwatcher, an open-source tool for debugging Milvus and dynamic configuration updates.
Explore Attu, an open-source GUI tool for intuitive Milvus management.