commit
cd5992c6db
@ -1,11 +1,13 @@ |
||||
### Run Minio docker image |
||||
```docker run -p 9000:9000 minio/minio``` |
||||
|
||||
This will start minio server in the docker container, the data however is not persistent. |
||||
Start docker, however image is not persistent. |
||||
|
||||
```bash |
||||
docker run -p 9000:9000 minio/minio fs /export/data |
||||
``` |
||||
|
||||
### Map data volumes from host |
||||
Map export and configuration directories from host for persistence. |
||||
|
||||
```bash |
||||
docker run -p 9000:9000 -v $HOME/export:/export -v $HOME/.minio:/root/.minio minio/minio |
||||
docker run -p 9000:9000 --name minio1 -v /mnt/export/minio1:/export -v /mnt/config/minio1:/root/.minio minio/minio fs /export/data |
||||
``` |
||||
|
@ -1,8 +1,8 @@ |
||||
# use "make dockerimage" to build |
||||
FROM alpine:3.3 |
||||
RUN apk add --no-cache ca-certificates |
||||
RUN apk add --no-cache ca-certificates bash |
||||
ADD minio.dockerimage /minio |
||||
ADD export /export |
||||
EXPOSE 9000 |
||||
ENTRYPOINT ["/minio"] |
||||
CMD ["server", "/export"] |
||||
COPY start.sh /start.sh |
||||
ENTRYPOINT ["/start.sh"] |
@ -0,0 +1,14 @@ |
||||
#!/bin/bash |
||||
|
||||
if [ "$1" = 'fs' ]; then |
||||
if [ -z "$2" ]; then |
||||
echo "Invalid arguments" |
||||
echo "Usage: fs <export_dir>" |
||||
exit 1 |
||||
else |
||||
/bin/mkdir -p "$2" && /minio init fs "$2" && /minio server |
||||
fi |
||||
else |
||||
echo "Usage: fs <export_dir>" |
||||
exit 0 |
||||
fi |
Loading…
Reference in new issue