PHP Apache Docker container for Drupal. Extended from the official PHP Apache Docker image.
- Create a user called bro for PHP Apache to run as and set the user id in your Dockerfile so that you can match it to the host user id to avoid permission problems. For example if you host user is called aleksi and has user id 1000 add this to your Dockerfile:
# Add the Bro user to run Nginx with permission to the files.
RUN useradd bro -u 1000 -s /bin/bash --no-create-home
- This container is meant to be used together with a linked MariaDB and optionally other containers (like a command based container for Drush). See example of a working combo here.
- See the original official PHP Apache image for info about how to extend this container.
- PHP Apache with extensions required by Drupal.
I typed command below
docker run --name phpdrupal -d -p 80:80 -v /Users/snappy/Sites/:/var/www/html/ aleksijohansson/drupal-php-apache
ocker@test:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a06410191e95 aleksijohansson/drupal-php-apache "apache2-foreground" About a minute ago Exited (1) 9 seconds ago phpdrupal
It didn't work, I want to advice this.
Thanks so much