mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
docker: Fix docker command entry.
This commit is contained in:
parent
24ae5467c8
commit
1ef5ab3c28
10
Docker.md
10
Docker.md
@ -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
|
||||
```
|
||||
|
3
Makefile
3
Makefile
@ -131,7 +131,8 @@ install: gomake-all
|
||||
|
||||
dockerimage: checkdocker verifiers $(UI_ASSETS)
|
||||
@echo "Building docker image:" minio:$(TAG)
|
||||
@GO15VENDOREXPERIMENT=1 GOOS=linux GOARCH=amd64 go build --ldflags $(DOCKER_LDFLAGS) -o minio.dockerimage
|
||||
@GO15VENDOREXPERIMENT=1 GOOS=linux GOARCH=amd64 go build --ldflags $(DOCKER_LDFLAGS) -o docker/minio.dockerimage
|
||||
@cd docker
|
||||
@mkdir -p export
|
||||
@sudo docker build --rm --tag=minio/minio:$(TAG) .
|
||||
@rmdir export
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
Minio is an object storage server compatible with Amazon S3 and licensed under [Apache license 2.0](./LICENSE).
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
Minio is an open source object storage server released under Apache License V2. It is compatible with Amazon S3 cloud storage service. Minio follows a minimalist design philosophy.
|
||||
@ -84,11 +83,12 @@ $ make
|
||||
|
||||
### How to use Minio?
|
||||
|
||||
Initialize minio server at `~/Photos`
|
||||
~~~
|
||||
$ minio init ~/Photos
|
||||
$ minio init fs ~/Photos
|
||||
~~~
|
||||
|
||||
#### Start Minio server.
|
||||
After successfully initializing, start minio server.
|
||||
|
||||
~~~
|
||||
$ minio server
|
||||
|
@ -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"]
|
14
docker/start.sh
Executable file
14
docker/start.sh
Executable file
@ -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
Block a user