Skip to content

Leaner docker image #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hcebke
Copy link
Contributor

@hcebke hcebke commented Apr 8, 2025

No description provided.

@pakerfeldt
Copy link
Owner

pakerfeldt commented Apr 9, 2025

While I like the suggestion to make the image more lean, this suggestion has a couple of downsides as well. Debugging will get harded, it's no longer possible to exec into the image and without debug symbols I would assume stacktraces are not readable anymore. Using scratch would, AFAIU, render TLS useless unless you provide certificates manually to the image. WIth CGO_ENABLED=0 we are relying on Go's built-in DNS resolver which could also have an unexpected effect, although maybe not so likely.

I'm all for making the image smaller, but if we want to go this far then at least we should provide this as an alternative to another standard image.

@hcebke
Copy link
Contributor Author

hcebke commented Apr 9, 2025

Those are fair points.
I've added the minimal image as knx-mqtt-minimal and restored the original one as knx-mqtt. This way, using docker build --target you can choose which one you want.
What do you think?

@pakerfeldt
Copy link
Owner

Love it! Will review this and the other PRs in the coming days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants