Looking at your logs apache won't run because it can't access conf file you have mounted:
7.1.x-webserver | apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Could not open config directory /etc/apache2/sites-enabled: Permission denied
This can be caused by a few reasons. In order to find the root cause I'll need more data.
- Which user runs docker-compose up command?
- Owner and group of volumes you're trying to mount (Show output of
ls -la
on each of those volumes).
- The user which is being used inside a container.
My guess is that files you're mounting dirs of UserA, and you're mounting them from UserB. Most probably files belong to root and you run from your local user henry@localhost
right? Maby not a secure solution but try to execute docker-compose from root user.
There is also the case where the UID and GID are different on host and container even though permissions are correct. As a result, you will have permission denied error.
Moreover, how do you even start apache? because I don't see it nither in docker-compose nor Dockerfile of that image? (By looking at example you're using)
By the way, you have also problem with mysql container but that's another story:
5.7-mysql | chown: cannot read directory '/var/lib/mysql/': Permission denied