Place docker files in scripts and update makefile
This commit is contained in:
parent
eece559fe7
commit
8a03a21de2
4
Makefile
4
Makefile
|
@ -113,9 +113,7 @@ clean:
|
|||
|
||||
.PHONY: docker-image
|
||||
docker-image:
|
||||
./scripts/build.py --package --platform=linux --arch=amd64
|
||||
cp build/telegraf*$(COMMIT)*.deb .
|
||||
docker build -f scripts/dev.docker --build-arg "package=telegraf*$(COMMIT)*.deb" -t "telegraf-dev:$(COMMIT)" .
|
||||
docker build -f scripts/stretch.docker -t "telegraf:$(COMMIT)" .
|
||||
|
||||
plugins/parsers/influx/machine.go: plugins/parsers/influx/machine.go.rl
|
||||
ragel -Z -G2 $^ -o $@
|
||||
|
|
|
@ -5,7 +5,7 @@ WORKDIR /go/src/github.com/influxdata/telegraf
|
|||
COPY Gopkg.toml Gopkg.lock ./
|
||||
RUN dep ensure -vendor-only
|
||||
COPY . /go/src/github.com/influxdata/telegraf
|
||||
RUN CGO_ENABLED=0 go install ./cmd/...
|
||||
RUN CGO_ENABLED=0 make go-install
|
||||
|
||||
FROM alpine:3.6
|
||||
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
|
||||
|
@ -16,6 +16,6 @@ COPY etc/telegraf.conf /etc/telegraf/telegraf.conf
|
|||
|
||||
EXPOSE 8125/udp 8092/udp 8094
|
||||
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
COPY scripts/docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["telegraf"]
|
|
@ -1,8 +0,0 @@
|
|||
FROM debian:stretch
|
||||
ARG package
|
||||
ADD ${package} ${package}
|
||||
RUN dpkg -i ${package}
|
||||
|
||||
EXPOSE 8125/udp 8092/udp 8094
|
||||
|
||||
CMD ["telegraf"]
|
|
@ -5,7 +5,7 @@ WORKDIR /go/src/github.com/influxdata/telegraf
|
|||
COPY Gopkg.toml Gopkg.lock ./
|
||||
RUN dep ensure -vendor-only
|
||||
COPY . /go/src/github.com/influxdata/telegraf
|
||||
RUN go install ./cmd/...
|
||||
RUN make go-install
|
||||
|
||||
FROM buildpack-deps:stretch-curl
|
||||
COPY --from=builder /go/bin/* /usr/bin/
|
||||
|
@ -13,6 +13,6 @@ COPY etc/telegraf.conf /etc/telegraf/telegraf.conf
|
|||
|
||||
EXPOSE 8125/udp 8092/udp 8094
|
||||
|
||||
COPY docker/entrypoint.sh /entrypoint.sh
|
||||
COPY scripts/docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["telegraf"]
|
Loading…
Reference in New Issue