Skip to content

Commit

Permalink
Fixed #11; Make the document root a volume so that it can be mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
TrafeX committed Jul 21, 2019
1 parent acf639e commit e829a11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RUN chown -R nobody.nobody /run && \
# Setup document root
RUN mkdir -p /var/www/html

# Make the document root a volume
VOLUME /var/www/html

# Switch to use a non-root user from here on
USER nobody

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ Start the Docker container:
docker run -p 80:8080 trafex/alpine-nginx-php7

See the PHP info on http://localhost, or the static html page on http://localhost/test.html

Or mount your own code to be served by PHP-FPM & Nginx

docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/alpine-nginx-php7

0 comments on commit e829a11

Please sign in to comment.