V3ckt0r / fluentd_exporter

Prometheus exporter for Fluentd
Apache License 2.0
73 stars 13 forks source link

Add dockerfile, clean up readme and remove .DS_Store file #2

Closed audip closed 6 years ago

audip commented 6 years ago

@V3ckt0r making this more usable with dockerfile that can be used to build container images on github with the fluentd exporter that you have written.

audip commented 6 years ago

Also, I'd recommend setting up automatic builds of docker image on https://hub.docker.com/ which will aid in driving adoption of this tool

V3ckt0r commented 6 years ago

Great, thanks for the PR @audip. I'll take a look.

audip commented 6 years ago

I have made that change. This PR is good to go.

V3ckt0r commented 6 years ago

Thanks for that @audip, I was having a closer look today and tested this Dockerfile. It doesn't complete it's build. See below:

[user@dev fluentd_exporter]$ docker build -t V3ckt0r/fluentd_exporter .
Sending build context to Docker daemon 7.311 MB
Step 1 : FROM golang:1.8
1.8: Pulling from library/golang
da5fc682280d: Pull complete
58405de707c7: Pull complete
c5e575173888: Pull complete
9c1d56694ba4: Pull complete
f0369993f03a: Pull complete
3540a140ccda: Pull complete
2f1008acf979: Pull complete
71d4b26481bb: Pull complete
81db8670452b: Pull complete
02437f6a6374: Pull complete
38af02b99fef: Pull complete
e15473e12950: Pull complete
e5572ce40764: Pull complete
Digest: sha256:85e05f84e4ffabe96cc3de2f56534fe57b67eb1a6cc0af7689745797bcf81069
Status: Downloaded newer image for golang:1.8
 ---> e5572ce40764
Step 2 : WORKDIR /go/src/app
 ---> Running in 1d5cea75a9fa
 ---> e26e28d1c7fd
Removing intermediate container 1d5cea75a9fa
Step 3 : COPY ./fluentd_exporter.go .
 ---> cd0bd4bf5635
Removing intermediate container 65d44b74b42e
Step 4 : RUN go-wrapper download
 ---> Running in dfb74c4cd551
Cannot mkdir: /go/src/app is not a directory
audip commented 6 years ago

The dockerfile steps are based on official golang docker and it builds correctly on my development machine and Jenkins was able to build it for UnderArmour's test setup. I'm wondering why it isn't building in the tests that you're running.

V3ckt0r commented 6 years ago

Hey @audip,

I think it by of been down to Docker version somehow. I tested above on

Client:
 Version:      1.9.0
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   76d6bc9
 Built:        Tue Nov  3 18:00:05 UTC 2015
 OS/Arch:      linux/amd64

Server:
 Version:      1.9.0
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   76d6bc9
 Built:        Tue Nov  3 18:00:05 UTC 2015
 OS/Arch:      linux/amd64

Might be too old to care about now. I've tested again on a later version and it looks good.

Thanks! :thumbsup:, merging in