2015-11-28 14:18:47 -05:00
|
|
|
## Running Minio in Docker.
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
### Installing Docker.
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
```bash
|
|
|
|
sudo apt-get install Docker.io
|
|
|
|
```
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
### Generating `minio configs` for the first time.
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
```bash
|
2016-02-04 21:19:49 -05:00
|
|
|
docker run -p 9000:9001 minio/minio:latest
|
2015-11-28 14:18:47 -05:00
|
|
|
```
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
### Persist `minio configs`.
|
2015-11-06 19:46:04 -05:00
|
|
|
|
2015-11-28 14:18:47 -05:00
|
|
|
```bash
|
|
|
|
docker commit <running_minio_container_id> minio/my-minio
|
|
|
|
docker stop <running_minio_container_id>
|
|
|
|
```
|
|
|
|
|
|
|
|
### Create a data volume container.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker create -v /export --name minio-export minio/my-minio /bin/true
|
|
|
|
```
|
|
|
|
|
|
|
|
You can then use the `--volumes-from` flag to mount the `/export` volume in another container.
|
|
|
|
|
|
|
|
```bash
|
2016-02-04 21:19:49 -05:00
|
|
|
docker run -p 9000:9001 --volumes-from minio-export --name minio1 minio/my-minio
|
2015-11-28 14:18:47 -05:00
|
|
|
```
|