I've got a debian image for php, php:fpm-bullseye
and it runs fine. The issue is that I want to add more php packages to this image, so according to instructions online, the steps are
sudo apt update
sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
sudo apt update
sudo apt install php8.1-<extension>
Everything works fine until I get to step 6. If i run php -v
it shows me
PHP 8.1.6 (cli) (built: May 28 2022 08:17:49) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
So it's not like PHP isn't installed at all, but it will not find any of the extensions for php. I've run through this several times and I don't see what I am missing.
What is the proper way to install php packages on debian?