Added build container

This commit is contained in:
Yuce Tekol 2017-02-04 13:00:21 +03:00
parent 741c073dd0
commit bf71ef036d
3 changed files with 10 additions and 6 deletions

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
.*

View file

@ -1,11 +1,14 @@
FROM scratch
FROM golang:1.7.5
MAINTAINER Pilosa Corp. <engineering@pilosa.com>
MAINTAINER Pilosa Corp. <dev@pilosa.com>
ENV DATA_DIR /data
EXPOSE 15000
VOLUME /data
COPY ./pilosa /pilosa
RUN echo 'data-dir = "/data"' > /config
ENTRYPOINT ["/pilosa"]
COPY . /go/src/github.com/pilosa/pilosa
RUN CGO_ENABLED=0 go install -a github.com/pilosa/pilosa/cmd/pilosa
ENTRYPOINT ["/go/bin/pilosa"]
CMD ["-config", "/config"]

View file

@ -7,4 +7,4 @@ vendor:
cp -r $(GOPATH)/src/github.com/gogo/protobuf/proto/testdata vendor/github.com/gogo/protobuf/proto/testdata
docker:
CGO_ENABLED=0 go build github.com/pilosa/pilosa/cmd/pilosa && docker build -t pilosa:latest .
docker build -t pilosa:latest .