How do I find out which Alpine Linux packages are currently available for add-ons?

In the documentation on configuring add-ons it says

All add-ons are based on the latest Alpine Linux image.

However, when I search for packages on the Alpine Packages web page I see ones that don’t work with the apk command (e.g. php82) in my add-on configurations - the packages can’t be found - so I am guessing that the “latest” Alpine Linux release doesn’t mean edge and through trial and error I am not sure it means 3.17 either.

What is the best way for me to find out which exact packages are available for use in my addons? Am I looking in completely the wrong place, or do I need to filter for a specific repository and branch?

It looks like 3.17

Looks like php82 is in Alpine edge.

php82 is not in any of the available base images based on debian (bullseye) or ubuntu (20.04) either.

Source: distrowatch DistroWatch.com: Put the fun back into computing. Use Linux, BSD.

Checking again, and although the images seem to now be based on Alpine 3.18, and PHP82 is available on 3.18 according to the Alpine package list.

I confirmed that my addon is using 3.18 by connecting to the container and running cat /etc/os-release which returned

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.18.2
PRETTY_NAME="Alpine Linux v3.18"

So this should be able to install PHP82, but this doesn’t work.

Now I don’t really need PHP82 over 81 right now - that is just a symptom of the overall problem I am having: determining which packages are available for addons. Knowing that Alpine 3.18 is used is not sufficient by itself - the apk command is failing to download packages that should be available to 3.18. Having to figure this out by trial and error is frustrating.

Ok - I think I have tracked down my confusion. The apk for php82 doesn’t create a symlink from php, which the apk for php81 does. So apk add --no-cache does indeed install php82, but the command php -S 0.0.0.0:8000 fails to start the server. php82 -S 0.0.0.0:8000 does start the server.

:man_facepalming:t2: