In order to run occ one needs sudo -u www-data occ, as recommended by the script itself.
However, sudo is not installed in the docker container.
To install sudo, one first must apt update && apt install sudo.
Are there any considerations to having sudo pre-installed, or not pre-installed in the container?
as workaround, you don't need sudo, You can run on host this command:
docker exec -u <user> -it <container> bash
then you will be in shell with selected user
That does indeed work, even with the user's shell being disabled! Thank you for that pointer :)
Most helpful comment
as workaround, you don't need sudo, You can run on host this command:
docker exec -u <user> -it <container> bashthen you will be in shell with selected user