17 ms·
There is no such thing as a “glibc based alpine image”
- dbt00 5y agoI've definitely had my share of annoyances with musl-libc and would probably consider building my base images around distroless if that were something I were dealing with right now. In the meantime, it's kinda shitty of someone to casually squat on the alpine linux namespace. If you want to make a small distribution that also ships glibc, then it's not alpine. Don't call it that.
- hhsbz 5y agoIf it's alpine with glibc I don't see what's wrong with calling it that
- faho 5y agoWhat's wrong with that is the reason trademarks exist: Confusion. If something is called "alpine-glibc", it's reasonable to expect that it's by the alpine people and supported like alpine. This, as we see here, annoys the alpine people because they now get bug reports and support requests from people using it, and have to direct people elsewhere. And when it doesn't work, they get the hit to their image even tho they've had nothing to do with it.
- hhsbz 5y agoI think it's clear from the website that this is based on Alpine and not part of the project https://hub.docker.com/r/frolvlad/alpine-glibc/ https://hub.docker.com/r/frolvlad/alpine-glibc/ Without context, I think what this guy is pissed off about is that this project enables people to use alpine to run proprietary software.
- faho 5y agoIt doesn't outright state anywhere that it's not an official alpine product, and I don't know if everyone reads the site - many people will just copy the "FROM frolvlad/alpine-glibc" from elsewhere. In any case, the Alpine people would know, and they apparently think it's a problem. >Without context, But you have context here! It has issues with symbol versioning! There is "strange behavior and possible crashes, ". This makes alpine look bad, because people think it's the alpine project's fault! > what this guy is pissed off Please don't assume everyone is a "guy". In this case, Ariadne is not a "he" (she uses "she"), so a male-coded word like "guy" is ill-fitting.
- im3w1l 5y agoFROM frolvlad/alpine-glibc That namespacing does make it look pretty unofficial to my eyes.
- faho 5y agoBut do you know if alpine does official docker images namespaced as e.g. alpine/? Is "alpine-glibc" an official project and someone just helpfully made the image (or an image including an official glibc package)? Or is this a prerelease? Without a deep knowledge of alpine (or now reading this post) I couldn't answer any of these questions and I'm not sure I wouldn't try to go to alpine for bug reports. I think there's a reasonable potential for confusion, even with the namespace. (but granted, I don't use docker either, so maybe this is a common thing) And I assume the alpine people (like the author) know that they get bug reports for it and that the issues with it cause bad publicity, and that that's the context for the post and the proposal to block the package.
- Karunamon 5y agoThe answer to the first question is an obvious yes, and it's obvious to anyone that uses Docker. No deep knowledge required. If you want Alpine, you do FROM alpine:(version). https://hub.docker.com/_/alpine https://hub.docker.com/_/alpine
- 5y ago
- jcelerier 5y agoIt's the old Iceweasel story all over again. Sadly open-source is ill-equipped to handle naming issues.
- diegocg 5y agoIt makes it look like an "official" project. Just give it a different name and explain that it's Alpine with glibc somewhere
- encryptluks2 5y agoIt does not. They use Alpine in the name so people can find the image. Searching for Alpine on Docker Hub has 49,530 results. This image doesn't even show up on the first page of results. I think whoever wrote this needs to rethink how ridiculous they are being.
- deleted 5y ago[deleted]
- op00to 5y agoI assumed it did.
- creshal 5y agoExcept it's not, as it mixes glibc with musl in ways that induce undefined behaviour you don't expect. If it was recompiling all packages to use glibc, the name would be more appropriate… but also still a trademark violation.
- encryptluks2 5y agoSo, of the 49,530 images that show up with several using Alpine somewhere in the name or description... you think this is a trademark violation how? Alpine is synonymous with lightweight images. Several people and vendors use it in their image names.
- lolc 5y agoI do expect images with "alpine" in the name to be based on the Alpine distro. And not some weird bastard of Alpine. And I see no problem with them asserting their trademark here.
- encryptluks2 5y agoThis is merely a package you install on Alpine so it isn't a fork. Did you not do any independent research and just assume? Want to move the goalposts?
- linkdd 5y agoThere is a difference between "python:3.10-alpine" and "alpine-glibc". One stands for: "we use alpine" (not a trademark violation) The other one stands for "this is alpine" (a trademark violation)
- encryptluks2 5y agoFirst, the repo name is alpine-pkg-glibc because it is merely a package you install on Alpine. The container name, created by a different individual is frolvlad/alpine-glibc, and they make it clear that it is based off Alpine with the glibc package installed. In fact, you can even look at the source code. This is ridiculous, and if Alpine starts going after people for using alpine in the container image name or tag then I now know what distro to avoid entirely.
- Aissen 5y agoI've had to battle quite a few portability issues, but everytime it was a program incorrectly assuming some sort of behaviour from glibc and not really musl's fault.
- p2t2p 5y agoWe had to stop using alpine because we have to resolve a DNS name that resolved in a 100 hosts. Musl fails to resolve that because it does not support “upgrade to TCP” and the response does not fit into single UDP packet so it gets truncated, so node fails to resolve the name. And not only node, normal Linux tools as well. And the author says it’s a feature, not a bug so for me it is kinda hard to take that thing seriously when parts of standard are unsupported.
- ntauthority 5y agoWhy is DNS resolution even part of the libc and not, say, the base OS, a service on the base OS, or if need be, an external library like c-ares? In fact, I thought Node already depended on c-ares, why is it failing on this?
- silon42 5y agoTypically, on a modern Linux system, DNS queries from libc (and everything else) will always query a local resolver (example: systemd-resolved).
- Spivak 5y agoThat's up to your distro technically. DNS queries that use glibc (so everything basically) parse /etc/nsswitch.conf and follow the path of NSS modules which can do whatever they want to produce a name. The resolve module provided by systemd talks to systemd-resolved but the dns module parses /etc/resolv.conf and does the resolution itself.
- p2t2p 5y agoAdding to the other responder. Traditionally, in Unix libc is part of the OS. This situation is different in Linux but Linux is an outlier here, if we look at various BSDs they keep libc in the same tree as kernel.
- sgerrand 5y agoMaintainer of the Alpine package referenced here. It's called `glibc`, makes no claims on Alpine Linux and certainly isn't a Linux distribution. You install the package in Alpine Linux, nothing else.
- deadbunny 5y agoMost people's experience with alpin is through containers. Given you provide `alpine-glibc` containers is likely where the confusion comes from. If you don't know the backstory one would easily assume this is an Alpine endorsed container.
- sgerrand 5y agoI don't provide "alpine-glibc" Docker images or containers, so I don't really know what you're referencing here. I maintain an Alpine package called `glibc`. Please enlighten me!
- tadfisher 5y agoTry nix sometime! When I'm forced to use Docker as a container runtime, nix has made building lightweight images fairly painless without the manual dependency management I see in so many dockerfiles. https://nix.dev/tutorials/building-and-running-docker-images https://nix.dev/tutorials/building-and-running-docker-images
- captainmuon 5y agoA side-note about glibc: I have only ever had problems with glibc versioned symbols. The only thing they more or less do is to pin an old executable to old library versions, and you can supposedly install a newer version of the library. You then save a little bit of disk space. - It doesn't allow you to install minor versions of the same library at the same time (thats how you end up with all these 1.so, 2.so) - So if you want a binary to work across multiple distributions, you can build it on a really old CentOS and if you are lucky it will work, but I have no trust in this. - Forward-compatibility is not really considered, where you update your libraries and your existing app becomes more powerful. - The dynamic linker doesn't allow you to load two different library versions at the same time (without a lot of contortions). You would think you could do `dlopen` and `dlsym` on two different `.so` files, and then just have separate function pointers to each version's functions. But the linker loves to load all the symbols into a global namespace for some reason. I'm sure there are ways to overcome all of this, but I feel too young to understand how it got this way and to old to learn it propertly :-P. If I were to design a new system today, I'd probably do something like .NET's global assembly cache: Just dump all library versions in /lib, and have the linker pick the best one at runtime. And make it easy to detect and react to a missing lib at runtime.
- sambe 5y agoWould you not just have more subtle, harder to debug problems if it were not for versioned symbols?
- captainmuon 5y agoI'm not at all against versioning, but found glibc's implementation a source of frustration. It would be great if you could install Qt 5.9, 5.12, 1.14 in parallel and have apps use the latest version (except for that one app that triggers a bug where you fix it to 5.9). This is an actual problem that occurred at work, I had to statically compile Qt in that case. Glibc's idea of lib versions doesn't help here at all if I understand correctly.
- colejohnson66 5y ago
- emilfihlman 5y ago"I don't like you exercising your right to foss, so we are going to make using foss harder for you". Foss shouldn't be about us going out on our way to block others.
- jsiepkes 5y ago> Foss shouldn't be about us going out on our way to block others. Sure, but this is about the Alpine project getting tired of being mistaken for the maintainers of a fork of their project. How would you feel if the power company would call you every week because they think your someone else and you had to explain the same thing every week?
- encryptluks2 5y agoHow are they being mistaken? No where do they claim to be the official Alpine image. This is like saying anyone who uploads an Alpine image with a few self-built packages installed is somehow conflating themselves with representing Alpine Linux, when in fact there is nothing the creator of this image has done to indicate that they are in any way considered the official Alpine project. In fact, Docker Hub has a place for official images. If someone is mistaking this package as being supported by Alpine Linux as a whole, then they also the same people that would mistake Google for any app installed from the Google Play Store.
- Sohcahtoa82 5y ago> How are they being mistaken? Because the image is named "alpine-glibc", but the "how" is irrelevant. People are getting confused and that's a problem. > No where do they claim to be the official Alpine image. Doesn't stop people from being mistaken. > If someone is mistaking this package as being supported by Alpine Linux as a whole, then they also the same people that would mistake Google for any app installed from the Google Play Store. Agreed.
- nightowl_games 5y ago> People are getting confused and that's a problem. Let's see the data.
- d3nj4l 5y agoI don't get it. There's a docker image called alpine-ruby. I presume that isn't supported by the alpine team either, but, honestly speaking, I'm doubtful that's causing enough of a support load on them. If it is, I would assume the reasonable solution to that is to close any support requests with "We are not responsible for that image" or something of that variant, or even requesting the creator of the image to mention that in the docs, but preventing users from installing ruby on alpine (!!!), not just images?
- sascha_sl 5y agoThis is inherently broken, and its brokenness is not obvious or clearly attributable to the hacky glibc. Imagine debugging an app on this (and possibly not even knowing it's based on an unofficial base image) not knowing this very specific behavior for hours with no results, you'd probably have a very bad impression of alpine.
- akerl_ 5y agoI don’t think anybody is arguing that shoving glibc into an Alpine image is a great idea. But if I decided to make an “alpine-goofy” image where I started with “FROM alpine” and then renamed all the binaries so cp was rm and rm was ls and so on, it would be a stupid idea but not trademark infringement. Could this project do everybody a favor by adding a banner saying “Hey y’all just FYSA we are not affiliated w/ Alpine upstream, please don’t send them glibc support requests”? Totally. But I’m shocked that Alpine’s approach here is to start by trying to implement a technical blocker for what I can install on my Alpine image, with an offhand remark that maybe they could try talking to the image owner first.
- sascha_sl 5y agoThese are completely different situations. Wanting glibc compat on Alpine is not an unusual requirement, unlike your "alpine-goofy" image, and the bugs it introduces are subtle and may not show up at all in some use-cases. Believe it or not, a lot of developers aren't aware we have different libc implementations at all, the "exec format error" or "file not found" errors alpine spits out already create a lot of support burden.
- TheJoeMan 5y agoI would like to point out the GitHub linked to in the article says “glibc alpine based image” as in based on the alpine-glibc image. It seems adriadne has misread it as glibc based alpine?
- encryptluks2 5y agoThis is seriously the saddest and dumbest post I've seen in a long time. Someone decides to build an Alpine package without ever claiming it is part of the official Alpine distro, you can't even install it using the default Alpine repos, and then they created a Docker image with it already installed... and somehow someone wants to complain and threaten to block the package from even being installed. This is like Microsoft levels of bad for FOSS, maybe even worse. No where are they claiming to represent the official Alpine image. I have plenty of Docker images that use Alpine as a base image. Am I somehow representing that they represent the official Alpine image? No. I wonder if this person is just bored, or mad in general and wanted to find something pointless to complain about.
- encryptluks2 5y agoJust checked out the GitHub repo. Apparently the author can't even be bothered with posting an issue seeing if there may be a more appropriate name for the GH repo, although I personally see nothing wrong with the name as it is merely a package that you have to manually install.
- wwarner 5y agoThe post correctly argues that linking across systems is unwise and unsound, but in making the argument it shows how valuable a consistent ABI is.
- hygh 5y agomusl's thread stack size is too low (128K), so many open source test suites segfault. I do not understand why musl doesn't move to at least 512K like OSX. The generous 8192K glibc thread stack size isn't actually used on Linux with overallocation, so I fail to see why musl chose that small default in the first place.
- synergy20 5y agomaybe, musl by design, is for resource limited embedded boxes. multiple threads with large stack size will eat up RAM. If you need larger thread stack I believe you can set it in the code. "Since 1.1.21, musl supports increasing the default thread stack size via the PT_GNU_STACK program header, which can be set at link time via -Wl,-z,stack-size=N." Of course you can always use pthread_attr_setstacksize
- masklinn 5y ago> maybe, musl by design, is for resource limited embedded boxes. multiple threads with large stack size will eat up RAM. It won’t really: that’s vmem, it’ll only need a bit of memory for the accounting of the mappings in the kernel.
- glb100 5y ago> Of course you can always use pthread_attr_setstacksize. No you can't, not with std::thread, which makes std::thread nearly unusable with musl.
- temac 5y ago> The generous 8192K glibc thread stack size isn't actually used on Linux with overallocation Is it even (over)committed? The main reason for having a max stack size is multithreading, but I'm not sure why it should be committed at all. Surely, an unbounded single thread stack is not precommitted to infinity?
- WesolyKubeczek 5y agoIf you want glibc, why use Alpine? Mainstream distributions are for glibc. Alpine exists specifically as a musl-based thing.
- IshKebab 5y agoYeah I thought the whole point of Alpine was that it abandoned the insanity of glibc for the relative sanity of musl. My only guess is that they like Alpine but want to run some binary software that links with glibc.
- hibikir 5y agoAn unfortunate reality of development today is that we have developers with little to no systems experience having to decide on base images, even though they haven't built any expertise on OSs. It makes perfect sense for this to happen: A different OS is a line away in a docker file, and they have to pick something! Among this rather large crowd, Alpine is popular for just one reason: it's small, and dealing with large images is more annoying, everything else being equal. But alpine and, say, ubuntu, aren't always equal. Those people then find one of the ugliest differences, often related to musl, or something they are using relying on glibc-like behavior, and then get to choose between a hack like this, or much larger images. As an example my organization was moving everything to alpine, but as part of the switch we found out that some computationally heavy tasks were getting significantly worse performance under alpine than with a glibc-based distro, mainly due to the relatively well documented issues with memory allocation performance. It'd not be surprising that someone finding themselves in this kind of situation ends up just adding glibc to alpine, instead of switching back, or figuring out how to tweak the memory allocator.
- ricardobeat 5y agoThis post would have done fine without the whole “we do not approve” / “we need to take them down” attitude. Call it a terrible idea, explain why, recommend against it, and be done with it; one shouldn’t need approval to maintain a fork, and they are not misrepresenting what it is. I find the animosity a little off-putting.
- r1ch 5y agoI think this comes from them using "Alpine" in the name for something that is not from the Alpine Linux team nor desired / supported by them. Users could be confused into thinking it's something officially supported and clog up official support channels with unrelated issues.
- MrStonedOne 5y agoAlpine is free to provide a solution to the problem then. Complaining about the problem isn't going to be productive, and until they publicize a way to convey you are a fork of the alpine project they will have this issue. Welcome to FOSS. xchat solved this with ychat.
- dralley 5y ago> Alpine is free to provide a solution to the problem then. This entire post is about how there isn't a solution to that problem. It's a fundamentally flawed idea.
- MrStonedOne 5y agoThe solution is to seperate the branding from the idea. There is no way for somebody to suggest in the name of their product that they are a downstream of alpine without using the word alpine. alpine linux can fix this by creating and providing a generic word for their flawed-opinionated-mini-linux whatever
- deadbunny 5y ago
- eckesicle 5y agoI've not used this particular image myself but I have installed glibc in an alpine image, then compiled some code and copied that over to run on the scratch image as part of a multi-stage build. Super useful as alpine is a small image and with none of the drawbacks mentioned in the blog post.
- ordx 5y agoI think the majority of people resort to this hack because security folks in their infinite wisdom require to use alpine and nothing else. Unfortunately, a lot of libraries don't support musl and have no plans to support it in the future, so you have to be creative.
- dec0dedab0de 5y agoI think this is a perfect example of why the Open Source Definition has "Integrity of The Author's Source Code" If they care about being associated with other people's projects, then they should add a bit to the license that they have to change the name of the project when modifying.
- herf 5y agoI think we need more well-maintained "parts" that can be used as alternatives to libc. For instance, string operations can be 5x faster on AVX2, but not every distro provides this code. I recently upgraded some Centos 6 machines (glibc 2.17) to Debian 10 (glibc 2.28) and system-provided strstr got about 5x faster, which was really important to my binary. I imagine similar differences exist between musl and glibc, due to lack of AVX2 or some other Intel optimizations in musl. But meanwhile, everyday functions like strstr or memcmp (that don't even allocate memory) are totally glued to the system libc (often with a slow version for your architecture). There is no broken-out "fast intel string ops" library that you can link with to ensure great+consistent performance on your target CPU (though I guess you could roll your own with nasm). Are big shared libc libraries good for security or other reasons? Maybe. But it does not make performance consistent across distros. It's fine for different distros to be 10% different in speed, but it's really not okay for them to be 500% apart.
- nonameiguess 5y agoSome things like this do exist. Some programs or even entire customized distros will LD_PRELOAD jemalloc for size or hardened malloc for security (I'm sure there's a performance-optimized version out there I don't know about). There's nothing at all stopping developers from providing optimized subsets of libc intended for more specific use cases than the fully-general system-wide libc. Note that when you're comparing Centos 6 to Debian 10, you're comparing a system released in 2011 that went end of life last November to a system released in 2019. I don't think it's that surprising that 8 years of development brought a 500% performance increase. Presumably, Centos 8 (released 17 days after Debian 10) would have had the newer glibc.
- rurban 5y agoIt should be called atlas-glibc or even himalaya-glibc, not related to alpine at all.
- encryptluks2 5y agoWhy? This is a package, not a fork of the project.
- croes 5y agoAnd if I need glibc for alpine how do I search for it?
- rurban 5y agoThere is no such thing as glibc on alpine. Alpine us by definition free of glibc bloat. Similar to devuan being free of systemd. How do you argue a systemd package for devuan should he handled? If you need a minimal distro, which supports musl and glibc as alternative use void.
- sgerrand 5y agoMaintainer of the Alpine glibc package referenced here. For some background context, this package was originally created to solve a specific problem long before Alpine provided glibc compatibility packages like `libc6-compat` and others. I agree that this package shouldn't be considered "blessed" or an official Alpine package or a default solution for running programs originally compiled against the GNU C library on Alpine Linux, far from it. The source control repository uses `alpine-pkg-` as a prefix to denote what it's used for—not as a means of assumed official status or such like. What I find saddening is to see passive aggressive statements like > I have additionally suggested that the TSC may wish to have the Alpine Council reach out to the alpine-glibc project to find a solution which appropriately communicates that the project is not supported in any way by Alpine. To the Alpine Linux TSC: please get in contact with me about any and all disclaimers you want to add to this package! I'd love to have these discussions faster and in the open, rather than discovering this disquiet tangentially. Let's get these issues resolved as soon as possible in a way that everyone concerned finds acceptable.
- pxc 5y agoj/w: What use cases do you have or have in mind for your glibc package? Do you see it as a temporary step for adding pre-built things to Alpine images during development, before you have time to rebuild them against musl? Do you feel some prod use cases are ‘safe enough’? Or nowadays do you generally prefer the upstream compatibility packages you mentioned?
- sgerrand 5y agoI don't compile my own software against glibc and run it in Alpine. As mentioned previously, this package was created ~ 6 years ago to run software compiled against glibc (that didn't have the source code available) in Alpine Linux. I don't recommend that anyone uses it over the equivalent Alpine package or compiling your software against musl-c.
- pxc 5y agoGotcha. Sorry your obsolete workaround is being painted as new and borderline malicious. :-\
- traceroute66 5y agoConceptually there is a lot to like about Alpine. But the problem is, as much as I want to like it and use it, there have always been rough edges to it. By and far, the biggest beef I kept on returning to with Alpine is the whole musl libc thing. Not because that's what they ship with, because well, "my house my rules" as the saying goes. But because the maintainers insisted on building various packages where the original external code developers stated quite clearly in their build guides that they didn't support anything other than glibc .... and yet Alpine would build and ship packages built against musl. Bit of a dangerous game to play if you ask me ! This was not random small external code bases either, we're talking about some quite well known open source projects here. I'm not sure if they still have the same "musl or bust" package building policy these days as its been a few years since I quit using Alpine for good. Hopefully they've changed their ways since then.
- deathanatos 5y ago> is like trying to run Windows programs on OS/2: both understand .EXE files to some extent, but they are otherwise very different. But you could run Windows programs on OS/2. They'd even render with the Windows window borders, and not the OS/2 ones.
- kazinator 5y agoThis should just call itself glibc-kludge-4-alpine. Most of the problem solved, I think.
- fisherjeff 5y agoSemi off-topic: While I like the idea of symbolic versioning in theory, in practice it has only ever caused me pain and never shown any benefit whatsoever: I really don’t care that cosf changed ever so slightly in 2.xx! Just use the cosf I have! At the very least, a simple, non-hacky way to force that linkage would be great but I have found no such thing. Anyone here had any better luck?
- paulddraper 5y ago> I have additionally suggested that the TSC may wish to have the Alpine Council reach out to the alpine-glibc project to find a solution which appropriately communicates that the project is not supported in any way by Alpine. Eye roll. Should glibc reach out as well?