mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
532bda0f1e | ||
|
|
6466441abe | ||
|
|
cdaf87a3bf |
2 changed files with 23 additions and 24 deletions
44
Dockerfile
44
Dockerfile
|
|
@ -1,29 +1,27 @@
|
||||||
FROM golang:1.8.0
|
FROM golang:1.8.1 as builder
|
||||||
|
|
||||||
MAINTAINER Pilosa Corp. <dev@pilosa.com>
|
|
||||||
|
|
||||||
ARG ldflags=''
|
ARG ldflags=''
|
||||||
|
ARG GLIDE="https://github.com/Masterminds/glide/releases/download/v0.12.3/glide-v0.12.3-linux-amd64.tar.gz"
|
||||||
|
ARG GLIDE_HASH="d6d3816c70fba716466e7381a9c06cb31565a3b87acb5bad9dd3beb0a9f9b0f8"
|
||||||
|
|
||||||
|
COPY . /go/src/github.com/pilosa/pilosa
|
||||||
|
|
||||||
|
RUN wget ${GLIDE} -O /go/glide.tar.gz -q \
|
||||||
|
&& tar xf /go/glide.tar.gz \
|
||||||
|
&& mv /go/linux-amd64/glide /go/bin \
|
||||||
|
&& [ "$(sha256sum /go/bin/glide | cut -d' ' -f1)" = "$GLIDE_HASH" ] \
|
||||||
|
&& cd /go/src/github.com/pilosa/pilosa \
|
||||||
|
&& make vendor \
|
||||||
|
&& CGO_ENABLED=0 go install -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
|
LABEL maintainer "dev@pilosa.com"
|
||||||
|
|
||||||
|
COPY --from=builder /go/bin/pilosa /pilosa
|
||||||
|
|
||||||
EXPOSE 10101
|
EXPOSE 10101
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
RUN echo 'data-dir = "/data"' > /config
|
ENTRYPOINT ["/pilosa"]
|
||||||
|
CMD ["server", "--data-dir", "/data"]
|
||||||
RUN git clone --depth 1 https://github.com/Masterminds/glide.git /go/src/github.com/Masterminds/glide \
|
|
||||||
&& cd /go/src/github.com/Masterminds/glide \
|
|
||||||
&& git fetch --tags --depth 1 \
|
|
||||||
&& git checkout tags/v0.12.3 -b build \
|
|
||||||
&& make build \
|
|
||||||
&& mv ./glide /go/bin \
|
|
||||||
&& cd / \
|
|
||||||
&& rm -r /go/src/github.com/Masterminds/glide
|
|
||||||
|
|
||||||
COPY . /go/src/github.com/pilosa/pilosa
|
|
||||||
|
|
||||||
RUN cd /go/src/github.com/pilosa/pilosa \
|
|
||||||
&& make vendor \
|
|
||||||
&& CGO_ENABLED=0 go install -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa \
|
|
||||||
&& rm -rf /go/src /go/pkg
|
|
||||||
|
|
||||||
ENTRYPOINT ["/go/bin/pilosa"]
|
|
||||||
CMD ["server", "--config", "/config"]
|
|
||||||
|
|
|
||||||
3
Makefile
3
Makefile
|
|
@ -62,5 +62,6 @@ endif
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
docker build -t "pilosa:$(VERSION)" \
|
docker build -t "pilosa:$(VERSION)" \
|
||||||
--build-arg ldflags="-X main.Version=$(VERSION) -X main.BuildTime=$(BUILD_TIME)" .
|
--build-arg ldflags="-X github.com/pilosa/pilosa/cmd.Version=$(VERSION) \
|
||||||
|
-X github.com/pilosa/pilosa/cmd.BuildTime=$(BUILD_TIME)" .
|
||||||
@echo "Created image: pilosa:$(VERSION)"
|
@echo "Created image: pilosa:$(VERSION)"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue