parent
8ef4ec24ca
commit
440bec28d9
@ -0,0 +1,16 @@ |
|||||||
|
# docker run |
||||||
|
|
||||||
|
To run docker image: |
||||||
|
```docker run -p 9000:9000 minio/minio:latest``` |
||||||
|
|
||||||
|
This will start minio server in the docker container, the data however is not persistent. |
||||||
|
If you need persistent storage you can use the command: |
||||||
|
|
||||||
|
```docker run -p 9000:9000 -v /home/krishna/.minio:/.minio -v /home/user/export:/export minio:latest``` |
||||||
|
|
||||||
|
Here the data uploaded to the minio server will be persisted to /home/user/export directory. |
||||||
|
|
||||||
|
# docker build |
||||||
|
|
||||||
|
To build the docker image: |
||||||
|
```make dockerimage TAG="<tag>"``` |
@ -1,38 +1,8 @@ |
|||||||
FROM ubuntu-debootstrap:14.04 |
# use "make dockerimage" to build |
||||||
|
FROM scratch |
||||||
MAINTAINER Minio Community |
ENV DOCKERIMAGE 1 |
||||||
|
ADD minio.dockerimage /minio |
||||||
ENV GOLANG_TARBALL go1.5.1.linux-amd64.tar.gz |
ADD export /export |
||||||
|
|
||||||
ENV GOROOT /usr/local/go/ |
|
||||||
ENV GOPATH /go-workspace |
|
||||||
ENV PATH ${GOROOT}/bin:${GOPATH}/bin/:$PATH |
|
||||||
|
|
||||||
ENV MINIOHOME /home/minio |
|
||||||
ENV MINIOUSER minio |
|
||||||
RUN useradd -m -d $MINIOHOME $MINIOUSER |
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get install -y -q \ |
|
||||||
curl \ |
|
||||||
git \ |
|
||||||
build-essential \ |
|
||||||
ca-certificates |
|
||||||
|
|
||||||
RUN curl -O -s https://storage.googleapis.com/golang/${GOLANG_TARBALL} && \ |
|
||||||
tar -xzf ${GOLANG_TARBALL} -C ${GOROOT%*go*} && \ |
|
||||||
rm ${GOLANG_TARBALL} |
|
||||||
|
|
||||||
ADD . ${GOPATH}/src/github.com/minio/minio |
|
||||||
|
|
||||||
RUN cd ${GOPATH}/src/github.com/minio/minio && \ |
|
||||||
make |
|
||||||
|
|
||||||
RUN apt-get remove -y build-essential curl git && \ |
|
||||||
apt-get -y autoremove && \ |
|
||||||
rm -rf /var/lib/apt/lists/* |
|
||||||
|
|
||||||
USER minio |
|
||||||
|
|
||||||
EXPOSE 9000 |
EXPOSE 9000 |
||||||
|
ENTRYPOINT ["/minio"] |
||||||
CMD ["sh", "-c", "${GOPATH}/bin/minio server"] |
CMD ["server", "/export"] |
||||||
|
Loading…
Reference in new issue