Merge pull request #985 from minio/harshavardhana-patch-1
Fix docker.md add data volume containermaster
commit
62e4d0d74b
@ -1,16 +1,32 @@ |
|||||||
# docker run |
## Running Minio in Docker. |
||||||
|
|
||||||
To run docker image: |
### Installing Docker. |
||||||
```docker run -p 9000:9000 minio/minio:latest``` |
|
||||||
|
|
||||||
This will start minio server in the docker container, the data however is not persistent. |
```bash |
||||||
If you need persistent storage you can use the command: |
sudo apt-get install Docker.io |
||||||
|
``` |
||||||
|
|
||||||
```docker run -p 9000:9000 -v ${HOME}/.minio:/.minio -v ${HOME}/export:/export minio:latest``` |
### Generating `minio configs` for the first time. |
||||||
|
|
||||||
Here the data uploaded to the minio server will be persisted to ${HOME}/export directory. |
```bash |
||||||
|
docker run -p 9000:9000 minio/minio:latest |
||||||
|
``` |
||||||
|
|
||||||
# docker build |
### Persist `minio configs`. |
||||||
|
|
||||||
To build the docker image: |
```bash |
||||||
```make dockerimage TAG="<tag>"``` |
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 |
||||||
|
docker run -p 9000:9000 --volumes-from minio-export --name minio1 minio/my-minio |
||||||
|
``` |
||||||
|
Loading…
Reference in new issue