Docker php:php7.4-apache boot-loop after installing mysqli extension

Docker php:php7.4-apache boot-loop after installing mysqli extension

Have you tried doing the install and apache restart inside a Dockerfile instead?

Something like:

FROM php:7.4.12-apache

RUN apt-get clean && apt-get update && apt-get install -y php7.4-mysqli; 

RUN service apache2 restart;

Then your docker-compose could be:

[...]

webserver:
    build:
      context: .
      dockerfile: docker/webserver/Dockerfile
    depends_on:
      - mysql
    restart: always
    volumes:
      - ./data/webserver:/var/www/html/
    ports:
      - 8888:80

[...]

Docker php:php7.4-apache boot-loop after installing mysqli extension

Leave a Reply

Your email address will not be published.