- paths
- versions
- extensions
docker run --name app -d -p 8080:80 \
-v /host/to/path/app:/var/www/app/ \
romeoz/docker-apache-php
See installed php-extension
docker exec -it app php -m
Adding PHP-extension
docker exec -it app bash -c 'apt-get update && apt-get install php-mongo && rm -rf /var/lib/apt/lists/*'
or
FROM romeoz/docker-apache-php:5.6
RUN apt-get update \
&& apt-get install -y php-mongo \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/app/
EXPOSE 80 443
CMD ["/sbin/entrypoint.sh"]
and
docker build -t php-5.6 .
docker run --name app -d -p 8080:80 php-5.6