Score:0

Container exits after installing mysqli in a dockerized PHP-apache

cn flag

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!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.