I am using as a base the php docker container with the tag:
php:5.6-apache
When I try to restart the apache2 inside the container, the containe
I want to customize the container, I need to install some extension and for them to work I need to restart apache for the changes to take effect.
This is against the Docker's immutable infrastructure principle. IMHO, you are using the docker container similar to a full blown VM. Instead, I would suggest you to treat the docker image as the final artifact and version it. Note: This is just my humble opinion, you may have a valid usecase which I am not aware of, which I am curious to find out.