12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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"]
|