occitech / docker

Docker images we use at Occitech
31 stars 36 forks source link

Problem launching container with kitematic #15

Open mokadev opened 8 years ago

mokadev commented 8 years ago

Hi

When i launch the container with kitematic i got this error:

AH00526: Syntax error on line 38 of /etc/apache2/apache2.conf: DocumentRoot must be a directory

Do i have to pass some environments variable?

real34 commented 8 years ago

Most of our images are aimed at being used as base images or with a volume containing the source code.

You might have forgotten to mount your source code as a volume in the container (hence the error of Apache not finding the document root to serve).

real34 commented 8 years ago

@mokadev: Here is an example of volume mounted in one of our project using the image occitech/magento:php7.0.0-apache

We are mounting the current directory in /var/www (.:/var/www), where the current directory contains a htdocs/ subdirectory with the Magento root. See https://github.com/occitech/docker/blob/86de857788ab0d75d63fe599f31d01d8cd47dd0f/magento/php7.0.0/apache/Dockerfile#L21 for further information.

Does it solve your problem?

mokadev commented 8 years ago

@real34 Sorry the problem is with magento2

you are exposing the /magento volume so i can choose the folder on the Mac. The problem is that the document root configured in /etc/apache2/apache2.conf of php:7.0.7-apache is not /magento.

Maybe you have just to expose the /var/www directory as well...