dcu / mongodb_exporter

MongoDB exporter for prometheus.io
MIT License
356 stars 216 forks source link

Use multi-stage build #69

Closed bewt85 closed 7 years ago

bewt85 commented 7 years ago

Hi @dcu

I was wondering if you're interested in using multistage builds? From Docker 17.05+ you can now build the golang binary in one container and then load it into another container automatically in a single docker build step without sacrificing image size.

https://docs.docker.com/engine/userguide/eng-image/multistage-build/

The advantage is that you could then auto-build the container in docker hub.

Let me know if you'd like me to make any other changes.

Thanks for building the project.

Ben

bewt85 commented 7 years ago

Thanks David

bewt85 commented 7 years ago

Would you be interested in creating a Docker Hub automated build from this so that we can just docker pull dcu/mongodb_exporter? I did it once a while ago. I think you just sign up for an account, point it at the repo and then it automagically builds each new version for you (for free if I recall correctly).