Update Docker commands to use /data as example directory (#4825)

/data as default makes it easy to understand and shortens
the example Minio command for Docker.
This commit is contained in:
Nitish Tiwari 2017-08-17 23:26:25 +05:30 committed by Dee Koder
parent 879cef37a1
commit 69555f1224
2 changed files with 18 additions and 18 deletions

View File

@ -8,13 +8,13 @@ Minio server is light enough to be bundled with the application stack, similar t
### Stable
```
docker pull minio/minio
docker run -p 9000:9000 minio/minio server /export
docker run -p 9000:9000 minio/minio server /data
```
### Edge
```
docker pull minio/minio:edge
docker run -p 9000:9000 minio/minio:edge server /export
docker run -p 9000:9000 minio/minio:edge server /data
```
Please visit Minio Docker quickstart guide for more [here](https://docs.minio.io/docs/minio-docker-quickstart-guide)

View File

@ -4,28 +4,28 @@
Docker installed on your machine. Download the relevant installer from [here](https://www.docker.com/community-edition#/download).
## Run Standalone Minio on Docker.
Minio needs a persistent volume to store configuration and application data. However, for testing purposes, you can launch Minio by simply passing a directory (`/export` in the example below). This directory gets created in the container filesystem at the time of container start. But all the data is lost after container exits.
Minio needs a persistent volume to store configuration and application data. However, for testing purposes, you can launch Minio by simply passing a directory (`/data` in the example below). This directory gets created in the container filesystem at the time of container start. But all the data is lost after container exits.
```sh
docker run -p 9000:9000 minio/minio server /export
docker run -p 9000:9000 minio/minio server /data
```
To create a Minio container with persistent storage, you need to map local persistent directories from the host OS to virtual config `~/.minio` and export `/export` directories. To do this, run the below commands
To create a Minio container with persistent storage, you need to map local persistent directories from the host OS to virtual config `~/.minio` and export `/data` directories. To do this, run the below commands
#### GNU/Linux and macOS
```sh
docker run -p 9000:9000 --name minio1 \
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
minio/minio server /export
-v /mnt/data:/data \
-v /mnt/config:/root/.minio \
minio/minio server /data
```
#### Windows
```sh
docker run -p 9000:9000 --name minio1 \
-v D:\export\minio1:/export \
-v D:\export\minio1-config:/root/.minio \
minio/minio server /export
-v D:\data:/data \
-v D:\minio\config:/root/.minio \
minio/minio server /data
```
## Run Distributed Minio on Docker
@ -43,9 +43,9 @@ To override Minio's auto-generated keys, you may pass secret and access keys exp
docker run -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
minio/minio server /export
-v /mnt/data:/data \
-v /mnt/config:/root/.minio \
minio/minio server /data
```
#### Windows
@ -53,9 +53,9 @@ docker run -p 9000:9000 --name minio1 \
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
-v D:\data:/data \
-v D:\minio\config:/root/.minio \
minio/minio server /data
```
### Minio Custom Access and Secret Keys using Docker secrets
@ -68,7 +68,7 @@ echo "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" | docker secret create secret_ke
Create a Minio service using `docker service` to read from Docker secrets.
```
docker service create --name="minio-service" --secret="access_key" --secret="secret_key" minio/minio server /export
docker service create --name="minio-service" --secret="access_key" --secret="secret_key" minio/minio server /data
```
Read more about `docker service` [here](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/)