| ... | ... |
@@ -6,8 +6,10 @@ |
| 6 | 6 |
|
| 7 | 7 |
Hello World |
| 8 | 8 |
=========== |
| 9 |
-This is the most basic example available for using Docker. The example assumes you have Docker installed. |
|
| 10 | 9 |
|
| 10 |
+.. include:: example_header.inc |
|
| 11 |
+ |
|
| 12 |
+This is the most basic example available for using Docker. The example assumes you have Docker installed. |
|
| 11 | 13 |
|
| 12 | 14 |
Download the base container |
| 13 | 15 |
|
| ... | ... |
@@ -6,6 +6,9 @@ |
| 6 | 6 |
|
| 7 | 7 |
Hello World Daemon |
| 8 | 8 |
================== |
| 9 |
+ |
|
| 10 |
+.. include:: example_header.inc |
|
| 11 |
+ |
|
| 9 | 12 |
The most boring daemon ever written. |
| 10 | 13 |
|
| 11 | 14 |
This example assumes you have Docker installed and with the base image already imported ``docker pull base``. |
| ... | ... |
@@ -18,7 +21,7 @@ out every second. It will continue to do this until we stop it. |
| 18 | 18 |
|
| 19 | 19 |
CONTAINER_ID=$(docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done") |
| 20 | 20 |
|
| 21 |
-We are going to run a simple hello world daemon in a new container made from the busybox daemon. |
|
| 21 |
+We are going to run a simple hello world daemon in a new container made from the base image. |
|
| 22 | 22 |
|
| 23 | 23 |
- **"docker run -d "** run a command in a new container. We pass "-d" so it runs as a daemon. |
| 24 | 24 |
- **"base"** is the image we want to run the command inside of. |
| ... | ... |
@@ -6,6 +6,9 @@ |
| 6 | 6 |
|
| 7 | 7 |
Building a python web app |
| 8 | 8 |
========================= |
| 9 |
+ |
|
| 10 |
+.. include:: example_header.inc |
|
| 11 |
+ |
|
| 9 | 12 |
The goal of this example is to show you how you can author your own docker images using a parent image, making changes to it, and then saving the results as a new image. We will do that by making a simple hello flask web application image. |
| 10 | 13 |
|
| 11 | 14 |
**Steps:** |