m-lab / alertmanager-github-receiver

Prometheus Alertmanager webhook receiver that creates GitHub issues from alerts
Apache License 2.0
48 stars 23 forks source link

Feature/make docker image smaller #55

Closed aorfanos closed 3 years ago

aorfanos commented 3 years ago

Changes:

Size reduction ~45% (43.49%) from 28.51MB to 16.11MB.


This change is Reviewable

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 156


Totals Coverage Status
Change from base Build 152: 0.0%
Covered Lines: 408
Relevant Lines: 408

💛 - Coveralls
aorfanos commented 3 years ago

hey @stephen-soltesz , happy to contribute to such an amazing project :)

Regarding this:

-w -s -extldflags '-static'

The flags -w -s are used to decrease image size by not including debugging information and the symbol table on the created executable. Flag extldflags static use was to create a static binary including libraries at build time, but after checking it does not contribute to the executable size reduction I have removed it.