Setting up a packaging environment for Alpine Linux (introducing alpkg)
blog.orhun.dev
blog.orhun.dev
stuff like this make me think the author hasn't really understood how containers work.
200 megabytes, so what? you're only going to download those the first time for the base layer.
all other times you'll likely be reusing the base layer and only download your own layer (depending on a few things, like the tag for the image you're using).
oh and by the way, musl libc can fail in mysterious ways. a while ago there was a post by someone who had almost gone mad because gethostaddr/getaddrinfo in musl libc would fail at resolving a (valid and existing) dns record in some circumstances, returning NXDOMAIN without much fuss (warning or anything).
The first time, and every time the base layer is updated, or any of the other layers under your application is updated. Sometimes you might not care, but I think that saving users a 200-300MB download on first use (and per base layer update) is still a great goal.
If your app is run inside of an app server proxied through a web server, you probably don't care that much about the underlying OS changes. If your app is system-level, underlying OS changes are a significant maintenance cost that greatly increases friction and reduces feature velocity.
Alpine's environmental stability and tiny security footprint make it ideal for system software that is being containerized.
https://www.alpinelinux.org/posts/Alpine-3.16.0-released.htm...
SIGNIFICANT CHANGES:
"sudo has been moved to community repository, which means that only latest stable release branch will get security updates in the future. Suggested replacement is doas and doas-sudo-shim." https://gitlab.alpinelinux.org/alpine/tsc/-/issues/1
The problem with Ubuntu is that they have made, and are accelerating, changes that provide no relevant benefits for most use cases and without good documentation or deprecation pathways, and with core OS functionality. They are making a lot of user-hostile changes that are intended to push users towards using Canonical created tooling and systems away from standardized techniques that work across distributions (e.g. the move from /etc/network/interfaces to netplan, the current push towards snaps away from apt packages).
By contrast, the changes in something like Alpine are much easier to deal with as part of our maintenance. Many of the changes are more negatively impactful for use-cases are Alpine that are outside of containerized applications, so they don't impact us.
Ubuntu's packaging of Firefox as a Snap (outside of apt) though is very much a surprise at first, and makes it easy to mistake your system/browser as being up-to-date... And that Firefox Snap container is not sandboxed like OpenBSD, and has full filesystem access.
I'm quite assured of my knowledge on the topic, but am always open to new information. If you have something specific you think you know that is related to my exact application where I am mistaken, please inform me, and I'll give it all due consideration. I suspect you don't, since you also don't know my exact application for doing this, so it seems a bit presumption to have the response that you did.
[1] https://gitlab.alpinelinux.org/alpine/tsc/-/issues/43#note_2...
They've historically been quite good and fast with security updates, and are one of the vendors that gets the inside track on security embargoes.
They're also really slow and stable, which is nice for boring plumbing.
Plus, a smaller resource footprint reduces resource pressure and improves application speed. Alpine is still leading in that.
Neither of those is as minimal as Alpine, and both are tied to companies that I view as having acted against my interests in the past.
for example postgres: https://github.com/bitnami/containers/tree/main/bitnami/post...
- bitnami/postgresql:15 bb50064c650b 275MB ( postgis included! )
- postgres:15-alpine 6a35e2c987a6 243MB
- postgres:15-bullseye 2bb008a38e7c 379MB
[1] https://github.com/bitnami/minideb
However, it is sometimes a good idea to benchmark the speed of different images, as sometimes a significant speed loss is possible. for example: alpine and bitnami images optimized for size.
If reliability and support is important then the official debian based images are the way to go. ( --> postgres:15-bullseye )
Other than Puppy Linux and Alpine, every “minimal” distro I’ve tried has been annoyingly huge.
node:lts-slim is 75MB node:lts-alpine is 50MB
Yes, 50% larger, but also has glibc for greater compatibility and can even be faster at runtime. I know Python containers tend to be faster on Debian than Alpine. So is 25MB really worth it? Especially when that 25MB is shared between multiple containers?
let me try to answer/research this question myself to find the answer/go on this journey:
takes me to
non slim: https://github.com/debuerreotype/docker-debian-artifacts/tre...
slim: https://github.com/debuerreotype/docker-debian-artifacts/tre...
https://github.com/debuerreotype/docker-debian-artifacts/blo... versus https://github.com/debuerreotype/docker-debian-artifacts/blo...
two files are identical
so at a quick glance i have no clue what is going into rootfs.tar.xz that makes one slim and one not
go to google:
https://stackoverflow.com/questions/59794891/how-does-debian...
> These tags are an experiment in providing a slimmer base (removing some extra files that are normally not necessary within containers, such as man pages and documentation), and are definitely subject to change.
There are already many reasons.
As cosmopolitan advances, there will be even more: think about what you could do with a set of binaries that would run anywhere.
That'll happen way sooner with a muslc based distribution than with any other libc, and there aren't many muslc distributions as popular as alpine (except Void): https://wiki.musl-libc.org/projects-using-musl.html
No glibc cruft.
No systemd cruft.
Still Linux though.
Not sure what the persistent storage requirement is about, but what I do, after installing my tool https://gitlab.com/esbs/package_builder-alpine/
``` git clone <aports repo>.git # Only needed once obviously cd aports [cd <pakage subdir] [TARGET_ARCH='x864_64']package_builder_alpine.sh [/bin/sh] ```
And that's it. The bringup-teardown of the container take a little time, so you can launch a shell instead, and call `package_builder_alpine.sh` within the shell.
The script will generate (temporary) keys if it cannot find them in the mounted volumes.
But even this can take some time, and so after running it once, to generate the keys etc, one can then just use the standard abuild tools, to make debugging faster.
In a second editor, on the local host, one can use any OS as per normal, e.g. git, vi, etc.
I call “The Larch” for my next project.
https://github.com/git-sgmoore/AlpineLinux-DailyDriverDeskto...
For some specific workflows I think it's a viable daily driver.
I've also seen other reports of the same issue, but for a different NVMe device.
The intro and all the background detail on motivation was great.