From dd3aead2816b27af6e3010b1a47227ee53ddca62 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 11 Sep 2017 12:11:31 -0700 Subject: [PATCH] Move up "without a dockerfile" section --- php/content.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/php/content.md b/php/content.md index 1cbbaac99..e1598ffa7 100644 --- a/php/content.md +++ b/php/content.md @@ -64,6 +64,14 @@ COPY src/ /var/www/html/ Where `src/` is the directory containing all your PHP code and `config/` contains your `php.ini` file. +### Without a `Dockerfile` + +If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following: + +```console +$ docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.0-apache +``` + ### How to install more PHP extensions We provide the helper scripts `docker-php-ext-configure`, `docker-php-ext-install`, and `docker-php-ext-enable` to more easily install PHP extensions. @@ -159,11 +167,3 @@ ENV APACHE_DOCUMENT_ROOT /path/to/new/root RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf ``` - -### Without a `Dockerfile` - -If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following: - -```console -$ docker run -d -p 80:80 --name my-apache-php-app -v "$PWD":/var/www/html php:7.0-apache -```