If your base system is Debian, then you need the DPA, not PPA. Ondrej has a DPA with basically the same packages:
https://deb.sury.org/
https://packages.sury.org/php/README.txt
If you're making your own images, you can choose whether to use Debian or something else as their base, but you'll need to adjust the PHP source accordingly. There is also an official PHP image from Docker Hub, but it's missing a lot of extensions, so you'll likely need to derive from it to install more.
For PHP-CLI, you don't need to set up the container as a service. You mount the host folder where you want to run the command onto the container's workdir, and invoke the command. Something like this:
podman run --rm -it -w /mnt -v .:/mnt php-image php --version
Replace php --version
with whatever command you want to run in the container. The container runs the command and immediately stops right after. The --rm
switch then deletes the container, which is not needed anymore (a new one will be created the next time you need it).
You can wrap this in a helper script to make it more convenient.
For PHP-FPM, to run the container as a service, you can write a custom SystemD .service file (or just some scripts) to start/stop the container as needed. You then connect to it via the exposed port on the container.
You don't need root to do any of this with Podman.