Skip to content

Commit

Permalink
convert p01 md to rst
Browse files Browse the repository at this point in the history
  • Loading branch information
rimelek committed Feb 20, 2021
1 parent 998ae57 commit 98b1843
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea
/.vscode
/venv
/docs/_build
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ You can try with more recent versions but some behaviour could be different in t
:caption: Projects:

projects/p00
projects/p01
34 changes: 34 additions & 0 deletions docs/projects/p01.rst
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
31 changes: 0 additions & 31 deletions projects/p01/README.md

This file was deleted.

0 comments on commit 98b1843

Please sign in to comment.