Ver Fonte

Added a debian build

Spencer Gardner há 7 anos atrás
pai
commit
da55baf048
2 ficheiros alterados com 47 adições e 1 exclusões
  1. 1 1
      Dockerfile
  2. 46 0
      Dockerfile.debian

+ 1 - 1
Dockerfile

@@ -1,6 +1,6 @@
 from alpine as build
 
-RUN apk add --update make automake gcc g++ git go
+RUN apk add --update git go musl-dev
 
 ENV GOPATH=/go
 ENV GOBIN=/go/bin

+ 46 - 0
Dockerfile.debian

@@ -0,0 +1,46 @@
+from debian as golang
+RUN apt-get update
+RUN apt-get install -y git golang
+RUN git clone https://go.googlesource.com/go
+WORKDIR /go
+RUN git checkout release-branch.go1.10
+WORKDIR /go/src
+RUN ./all.bash
+
+
+
+##########################
+from debian as build
+
+RUN apt-get update 
+RUN apt-get install -y  git 
+
+COPY --from=golang /go /go-bin
+ENV PATH=/go-bin/bin:$PATH
+
+ENV GOROOT=/go-bin
+ENV GOPATH=/go
+ENV GOBIN=/go/bin
+ENV PATH=$PATH:/go/bin
+
+RUN go get -u github.com/influxdata/influxdb
+WORKDIR /go/src/github.com/influxdata/influxdb/cmd/influxd
+RUN go get
+RUN go install
+
+WORKDIR /go/src/github.com/influxdata/influxdb/cmd/influx
+RUN go get
+RUN go install
+
+########################
+FROM debian as main
+COPY --from=build /go/bin/influx* /usr/bin/
+ADD influxdb.conf /etc/influxdb/influxdb.conf
+
+VOLUME /var/lib/influxdb/
+
+COPY entrypoint.sh /entrypoint.sh
+COPY init-influxdb.sh /init-influxdb.sh
+
+ENTRYPOINT ["/entrypoint.sh"]
+CMD ["influxd"]