Revised Docker.md (#1311)

master
GarimaKapoor 9 years ago committed by Harshavardhana
parent bea6f33b08
commit ac30bef72a
  1. 17
      Docker.md

@ -1,24 +1,27 @@
### Run Minio docker image ### Run Minio docker image
Start docker with random keys, generated name, and ephemeral data: ## Test Minio Docker Container
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.
```bash ```bash
docker run -p 9000:9000 minio/minio server /export docker run -p 9000:9000 minio/minio server /export
``` ```
Start docker, ephemeral data with consistent name (minio1) and keys (examples shown are from AWS documentation and should be changed): ## Run Minio Docker Container
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.
```bash ```bash
docker run -p 9000:9000 --name minio1 \ docker run -p 9000:9000 --name minio1 \
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \ -v /mnt/export/minio1:/export \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \ -v /mnt/config/minio1:/root/.minio \
minio/minio server /export minio/minio server /export
``` ```
Map export and configuration directories from host for persistence: ## Custom Access and Secret Keys
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.
```bash ```bash
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 /mnt/export/minio1:/export \ -v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \ -v /mnt/config/minio1:/root/.minio \
minio/minio server /export minio/minio server /export

Loading…
Cancel
Save