Merge pull request #958 from krishnasrinivas/docker-fixes
docker: the docker image will now contain just the static binarymaster
commit
fe1684d706
@ -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 |
||||
|
||||
MAINTAINER Minio Community |
||||
|
||||
ENV GOLANG_TARBALL go1.5.1.linux-amd64.tar.gz |
||||
|
||||
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 |
||||
|
||||
# use "make dockerimage" to build |
||||
FROM scratch |
||||
ENV DOCKERIMAGE 1 |
||||
ADD minio.dockerimage /minio |
||||
ADD export /export |
||||
EXPOSE 9000 |
||||
|
||||
CMD ["sh", "-c", "${GOPATH}/bin/minio server"] |
||||
ENTRYPOINT ["/minio"] |
||||
CMD ["server", "/export"] |
||||
|
Loading…
Reference in new issue