Support Wolfi-based dev containers #1139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wolfi is a relatively new distro focused on minimalism and fast package updates, in the service of low-to-no-CVE images. Like Alpine, it uses
apk
as its package manager. Unlike Alpine, it's glibc-based, and doesn't use musl.I tried to use devpod to run a Wolfi-based container, and got this error:
Decoding that error, it says:
Looking at the code, it looks like
alpine.go
expects the presence ofapk
to determine whether the image is Alpine, and if so, it installs necessary tools, includinggcompat
. Wolfi, being glibc-based, doesn't includegcompat
(it's a glibc compatibility layer for musl), so this fails.This PR makes the following changes to better support Wolfi-based images:
ID=alpine
in/etc/os-release
to determine ifgcompat
is needed.InstallAlpineRequirements
toInstallAPKRequirements
and rephrase error messages, since it now handles any distro usingapk
as a package manager.Let me know if there's anywhere else I should be looking for Alpine assumptions, I'm happy to send more PRs after this one.