0

I am new to Docker and I need a php:8.0-apache container with mysqli installed. Just mentioning mysqli on a raw image causes an error:

Fatal error: Uncaught Error: Class "mysqli" not found

I tried to use such command in docker-comose.yml:

command: ["docker-php-ext-install", "mysqli"]
# Or
command: docker-php-ext-install mysqli

As a result, the container exits with code 0 for some reason. Full logs of the container.

Same behavior was both in php:8.0-apache and php:7.4-apache containers. How to prevent container from exiting after mysqli installation?

Thanks in advance!

Genken
  • 1

0 Answers0