PhilipMay / smart-prom-next

S.M.A.R.T. Prometheus Metrics Exporter
MIT License
17 stars 1 forks source link

[FR] Add Alpine as base Docker image flavor #40

Closed ngosang closed 2 years ago

ngosang commented 2 years ago

Use Alpine as base Docker image. The main benefit is reduce the Docker image size. Example => https://github.com/ngosang/urbackup-exporter/blob/master/DockerfileAlpine

PhilipMay commented 2 years ago

Good point. Thanks for the suggestion @ngosang .

I had deliberately chosen the slim debian, because I think that the image is virtually never used alone. Docker usually runs other images. Since Debian Slim is also used in other images, it does not matter. The base image is there more or less as it is. Then the size no longer plays a role.

What do you think?

Anyway. I could provide both. A Debian Slim version and an Alpine version.

Do you want to contibute an Alpine version?

ngosang commented 2 years ago

I just opened another issue. It's not working for me ATM. In this repository you have the 2 Dockerfiles and the GitHub action to publish both images => https://github.com/ngosang/urbackup-exporter It's another Prometheus exporter in Python so it should be copy&paste.

PhilipMay commented 2 years ago

Thanks for your link and "template" @ngosang

I added an Alpine flavor in Version "0.0.4rc1" - could you maybe test it please?

https://github.com/PhilipMay/smart-prom-next/pkgs/container/smart-prom-next/29988670?tag=0.0.4rc1-alpine

PhilipMay commented 2 years ago

@ngosang on my private bare metal docker installation the alpine image works...

ngosang commented 2 years ago

Tested. It works well but it's possible to reduce Docker' images size to half. You can pen another issue for that.

image

PhilipMay commented 2 years ago

Thanks for testing. Does that mean that I can also close #41 ?

@ngosang what do you mean by "You can pen another issue for that."

ngosang commented 2 years ago

it's possible to reduce Docker' images size to half. (if you do some changes in the Dockerfiles to avoid caching files and reduce the number of layers)

You can open another issue for that.

PhilipMay commented 2 years ago

You can open another issue for that.

Ok - done in #45

PhilipMay commented 2 years ago

closing