2016-07-19 17:30:32 -04:00
# Minio Docker Quickstart Guide [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2015-11-06 19:46:04 -05:00
2017-01-07 21:35:12 -05:00
## 1. Prerequisites
### GNU/Linux
Install Docker for GNU/Linux from [here ](https://www.docker.com/products/docker#/linux )
### Microsoft Windows
Install Docker for Windows from [here ](https://www.docker.com/products/docker#/windows )
### macOS
Install Docker for macOS from [here ](https://www.docker.com/products/docker#/mac )
## 2. Test Minio on Docker.
2016-04-12 02:59:12 -04:00
Minio generates new access and secret keys each time you run this command. Container state is lost after you end this session. This mode is only intended for testing purpose.
2016-07-19 17:30:32 -04:00
2016-07-21 17:58:16 -04:00
```sh
2016-10-12 21:31:23 -04:00
docker run -p 9000:9000 minio/minio server /export
2016-03-24 20:28:04 -04:00
```
2015-11-06 19:46:04 -05:00
2017-01-07 21:35:12 -05:00
## 3. Run Minio Standalone on Docker.
2016-07-21 17:58:16 -04:00
2016-09-01 19:35:26 -04:00
Minio container requires a persistent volume to store configuration and application data. Following command maps local persistent directories from the host OS to virtual config `~/.minio` and export `/export` directories.
2016-02-18 05:13:52 -05:00
2017-01-07 21:35:12 -05:00
### GNU/Linux and macOS
2016-07-21 17:58:16 -04:00
2017-01-07 21:35:12 -05:00
```sh
2016-04-11 15:33:34 -04:00
docker run -p 9000:9000 --name minio1 \
2016-04-12 02:59:12 -04:00
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
2016-10-12 21:31:23 -04:00
minio/minio server /export
2017-01-07 21:35:12 -05:00
```
### Microsoft Windows
2016-07-21 17:58:16 -04:00
2017-01-07 21:35:12 -05:00
```sh
docker run -p 9000:9000 --name minio1 \
-v D:\export\minio1:/export \
-v D:\export\minio1-config:/root/.minio \
minio/minio server /export
2016-04-11 15:33:34 -04:00
```
2017-01-07 21:35:12 -05:00
## 4. Run Minio Standalone on Docker with Custom Access and Secret Keys
2016-07-21 17:58:16 -04:00
2016-04-12 02:59:12 -04:00
To override Minio's auto-generated keys, you may pass secret and access keys explicitly as environment variables. Minio server also allows regular strings as access and secret keys.
2016-07-21 17:58:16 -04:00
2017-01-07 21:35:12 -05:00
### GNU/Linux and macOS
2016-07-21 17:58:16 -04:00
2017-01-07 21:35:12 -05:00
```sh
2016-04-11 15:33:34 -04:00
docker run -p 9000:9000 --name minio1 \
2016-04-12 02:59:12 -04:00
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
2016-04-11 15:33:34 -04:00
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
2016-10-12 21:31:23 -04:00
minio/minio server /export
2017-01-07 21:35:12 -05:00
```
### Microsoft Windows
2016-07-21 17:58:16 -04:00
2017-01-07 21:35:12 -05:00
```sh
docker run -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
-v D:\export\minio1:/export \
-v D:\export\minio1-config:/root/.minio \
minio/minio server /export
2015-11-28 14:18:47 -05:00
```
2016-08-30 06:53:29 -04:00
2017-01-07 21:35:12 -05:00
## 5. Test Distributed Minio on Docker
2016-08-30 06:53:29 -04:00
2016-12-02 13:47:18 -05:00
This example shows how to run 4 node Minio cluster inside different docker containers using [docker-compose ](https://docs.docker.com/compose/ ). Please download [docker-compose.yml ](https://raw.githubusercontent.com/minio/minio/master/docs/docker/docker-compose.yml ) to your current working directory, docker-compose pulls the Minio Docker image.
2016-08-30 06:53:29 -04:00
2017-01-07 21:35:12 -05:00
#### Run `docker-compose` on GNU/Linux and macOS
2016-08-30 06:53:29 -04:00
2016-10-14 00:34:03 -04:00
```sh
2016-10-31 05:08:16 -04:00
docker-compose pull
2016-10-14 00:34:03 -04:00
docker-compose up
2016-08-30 06:53:29 -04:00
```
2016-09-01 19:35:26 -04:00
2017-01-07 21:35:12 -05:00
#### Run `docker-compose.exe` on Microsoft Windows
```sh
docker-compose.exe pull
docker-compose.exe up
```
Each instance is accessible on the host at ports 9001 through 9004, proceed to access the Web browser at http://127.0.0.1:9001/
## 6. Explore Further
* [Minio Erasure Code QuickStart Guide ](https://docs.minio.io/docs/minio-erasure-code-quickstart-guide )
* [Distributed Minio Quickstart Guide ](https://docs.minio.io/docs/distributed-minio-quickstart-guide )
* [Docker Compose ](https://docs.docker.com/compose/ )