Skip to content

Commit e829a11

Browse files
committed
Fixed #11; Make the document root a volume so that it can be mounted
1 parent acf639e commit e829a11

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ RUN chown -R nobody.nobody /run && \
2626
# Setup document root
2727
RUN mkdir -p /var/www/html
2828

29+
# Make the document root a volume
30+
VOLUME /var/www/html
31+
2932
# Switch to use a non-root user from here on
3033
USER nobody
3134

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ Start the Docker container:
3636
docker run -p 80:8080 trafex/alpine-nginx-php7
3737

3838
See the PHP info on http://localhost, or the static html page on http://localhost/test.html
39+
40+
Or mount your own code to be served by PHP-FPM & Nginx
41+
42+
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/alpine-nginx-php7

0 commit comments

Comments
 (0)