minio/Docker.md

29 lines
1.1 KiB
Markdown
Raw Normal View History

### Run Minio docker image
2016-04-12 08:59:12 +02:00
## 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.
2016-03-25 01:28:04 +01:00
```bash
2016-04-16 02:40:56 +02:00
docker run -p 9000:9000 minio/minio /export
2016-03-25 01:28:04 +01:00
```
2016-04-12 08:59:12 +02:00
## 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
docker run -p 9000:9000 --name minio1 \
2016-04-12 08:59:12 +02:00
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
2016-04-16 02:40:56 +02:00
minio/minio /export
```
2016-04-12 08:59:12 +02:00
## 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
docker run -p 9000:9000 --name minio1 \
2016-04-12 08:59:12 +02:00
-e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
-e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
-v /mnt/export/minio1:/export \
-v /mnt/config/minio1:/root/.minio \
2016-04-16 02:40:56 +02:00
minio/minio /export
```