fmartinou / teleinfo2mqtt

Publish teleinfo to mqtt topics
https://fmartinou.github.io/teleinfo2mqtt
MIT License
64 stars 17 forks source link

Implement docker multi-stage build to reduce final image size #49

Closed rtorrente closed 1 year ago

rtorrente commented 1 year ago

Hello @fmartinou,

I made a quick PR to implement docker multi-stage build on your Dockerfile to reduce the final image size. Now the final image size don't have linux-headers and other builds deps.

It seems to work well on my raspberry running my production.

I had to add moment as deps because it's an optional deps for bunyan (I disable optional deps on npm install) and it is required for bunyan with -L flag

Before multi stage, image on my raspberry is : 352.4 MB After multi stage, image on my raspberry is 116.7 MB

fmartinou commented 1 year ago

Hi @rtorrente ,

It looks all good to me; thank you very much for your contribution 👍 !

fmartinou commented 1 year ago

Released as 8.3.0