Skip to content
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

Move image base to Alpine #52

Open
Jacalz opened this issue Jul 10, 2024 · 6 comments
Open

Move image base to Alpine #52

Jacalz opened this issue Jul 10, 2024 · 6 comments
Labels
performance Issues related to performance

Comments

@Jacalz
Copy link
Member

Jacalz commented Jul 10, 2024

As a much further step than #49, we should look at potentially switching to Alpine Linux for the base image (if possible).

Alpine images are tiny in size and should likely allow us to shave many megabytes from our images and thus make downloads smaller. Smaller downloads will of course be helpful for a lot on people; especially for downloads on metered connections and gives a smaller installed footprint.

@Jacalz Jacalz added enhancement New feature or request performance Issues related to performance and removed enhancement New feature or request labels Jul 10, 2024
@Bluebugs
Copy link
Contributor

I don't think that is possible or a good idea. Alpine rely on musl for libc which is not what most distribution use. The generated binary might be incompatible and we still need to distribute gnu libc to do the linking, so I don't expect much gain once you get all working.

Alpine is great for container in cluster that require a lot of dependencies, but it isn't a great solution to do compilation work.

@Jacalz
Copy link
Member Author

Jacalz commented Jul 11, 2024

I am aware of it using musl and the downside that you mention but I figured that it wouldn't be a problem for us given that Zig should contain all of the glibc bits that we need for the compiles?

@Bluebugs
Copy link
Contributor

Except it only has the glibc bits, none of the other dependencies are there (X, Wayland, glfw, ...) and we would need to download the debian package anyway for those. I don't think it is worse the time, effort and maintenance burden to follow such a route.

@Jacalz
Copy link
Member Author

Jacalz commented Jul 13, 2024

But header files are header files and those packages are there and installable no matter how you look at it; there is even Alpine Linux setup documentation at https://docs.fyne.io/started/. Why would that not work? I don't see any reason for why Debian packages would need to be installed on top.

@Bluebugs
Copy link
Contributor

Except header in C can have macro that depends on the C library you are using at the time of compilation and can lead to incompatible code being generated.

@Jacalz
Copy link
Member Author

Jacalz commented Jul 17, 2024

Yes but are those macros really set when the development package is created? Zig has support for switching between compiling with glibc and musl (which I've used on glibc to compile binaries with musl), surely it would set those macros correctly at build time?

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

No branches or pull requests

2 participants