-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.idea | ||
/.vscode | ||
/venv | ||
/docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
==================================================== | ||
Start a simple web server with mounted document root | ||
==================================================== | ||
|
||
Start the container: | ||
|
||
.. code:: bash | ||
docker run -d -v $(pwd)/www:/usr/local/apache2/htdocs:ro --name p01_httpd -p "8080:80" httpd:2.4 | ||
# or | ||
docker run -d --mount type=bind,source=$(pwd)/www,target=/usr/local/apache2/htdocs,readonly --name p01_httpd -p "8080:80" httpd:2.4 | ||
Generate a domain name: | ||
|
||
.. code:: bash | ||
xip | ||
# example output: | ||
# 192.168.1.2.xip.io | ||
Test the web page: | ||
|
||
.. code:: text | ||
http://192.168.1.2.xip.io:8080 | ||
# output: | ||
# Hello Docker (p01) | ||
Delete the container to make port 8080 free again. | ||
|
||
.. code:: bash | ||
docker rm -f p01_httpd | ||
This file was deleted.
Oops, something went wrong.