Skip to content

Commit

Permalink
convert p02 md to rst
Browse files Browse the repository at this point in the history
  • Loading branch information
rimelek committed Feb 20, 2021
1 parent 98b1843 commit 7c5e424
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
4 changes: 1 addition & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ If it does not exist or empty, then set the value manually or run the script bel
All off the examples were tested with Docker 20.10.1. The version of Docker Compose was 1.27.4.
You can try with more recent versions but some behaviour could be different in the future.

* [p00](projects/p00/README.md): Collection of basic commands
* [p01](projects/p01/README.md): Start a simple web server with mounted document root.
* [p02](projects/p02/README.md): Build yur own web server image and copy the document root into the image.
* [p03](projects/p03/READMe.md): Create your own PHP application with built-in PHP web server.
* [p04](projects/p04/README.md): Create a simple [Docker Compose](https://docs.docker.com/compose/) project.
* [p05](projects/p05/README.md): Communication of PHP and Apache HTTPD web serverwith the help of [Docker Compose](https://docs.docker.com/compose/).
Expand All @@ -92,3 +89,4 @@ You can try with more recent versions but some behaviour could be different in t

projects/p00
projects/p01
projects/p02
27 changes: 27 additions & 0 deletions docs/projects/p02.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
========================================================================
Build yur own web server image and copy the document root into the image
========================================================================

Building an image:

.. code:: bash
docker build -t localhost/p02_httpd .
The dot character at the and of the line is important and required.

Start container:

.. code:: bash
docker run -d --name p02_httpd -p "80:80" localhost/p02_httpd
You can open the website from a web browser on port 80.
The output should be "Hello Docker (p02)"

Delete the container to make port 8080 free again.

.. code:: bash
docker rm -f p02_httpd

0 comments on commit 7c5e424

Please sign in to comment.