github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/docs/orchestration/docker-compose/README.md (about) 1 # Deploy MinIO on Docker Compose [](https://slack.min.io) [](https://hub.docker.com/r/minio/minio/) 2 3 Docker Compose allows defining and running single host, multi-container Docker applications. 4 5 With Compose, you use a Compose file to configure MinIO services. Then, using a single command, you can create and launch all the Distributed MinIO instances from your configuration. Distributed MinIO instances will be deployed in multiple containers on the same host. This is a great way to set up development, testing, and staging environments, based on Distributed MinIO. 6 7 ## 1. Prerequisites 8 9 * Familiarity with [Docker Compose](https://docs.docker.com/compose/overview/). 10 * Docker installed on your machine. Download the relevant installer from [here](https://www.docker.com/community-edition#/download). 11 12 ## 2. Run Distributed MinIO on Docker Compose 13 14 To deploy Distributed MinIO on Docker Compose, please download [docker-compose.yaml](https://github.com/minio/minio/blob/master/docs/orchestration/docker-compose/docker-compose.yaml?raw=true) and [nginx.conf](https://github.com/minio/minio/blob/master/docs/orchestration/docker-compose/nginx.conf?raw=true) to your current working directory. Note that Docker Compose pulls the MinIO Docker image, so there is no need to explicitly download MinIO binary. Then run one of the below commands 15 16 ### GNU/Linux and macOS 17 18 ```sh 19 docker-compose pull 20 docker-compose up 21 ``` 22 23 or 24 25 ```sh 26 docker stack deploy --compose-file docker-compose.yaml minio 27 ``` 28 29 ### Windows 30 31 ```sh 32 docker-compose.exe pull 33 docker-compose.exe up 34 ``` 35 36 or 37 38 ```sh 39 docker stack deploy --compose-file docker-compose.yaml minio 40 ``` 41 42 Distributed instances are now accessible on the host using the Minio CLI on port 9000 and the Minio Web Console on port 9001. Proceed to access the Web browser at <http://127.0.0.1:9001/>. Here 4 MinIO server instances are reverse proxied through Nginx load balancing. 43 44 ### Notes 45 46 * By default the Docker Compose file uses the Docker image for latest MinIO server release. You can change the image tag to pull a specific [MinIO Docker image](https://hub.docker.com/r/minio/minio/). 47 48 * There are 4 minio distributed instances created by default. You can add more MinIO services (up to total 16) to your MinIO Compose deployment. To add a service 49 * Replicate a service definition and change the name of the new service appropriately. 50 * Update the command section in each service. 51 * Add a new MinIO server instance to the upstream directive in the Nginx configuration file. 52 53 Read more about distributed MinIO [here](https://min.io/docs/minio/container/operations/install-deploy-manage/deploy-minio-single-node-multi-drive.html). 54 55 ### Explore Further 56 57 * [Overview of Docker Compose](https://docs.docker.com/compose/overview/) 58 * [MinIO Docker Quickstart Guide](https://min.io/docs/minio/container/index.html#quickstart-for-containers) 59 * [MinIO Erasure Code QuickStart Guide](https://min.io/docs/minio/container/operations/concepts/erasure-coding.html)