You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sources/examples/hello_world_daemon.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,20 @@ Hello World Daemon
11
11
12
12
The most boring daemon ever written.
13
13
14
-
This example assumes you have Docker installed and with the base image already imported ``docker pull base``.
15
-
We will use the base image to run a simple hello world daemon that will just print hello world to standard
14
+
This example assumes you have Docker installed and with the ubuntu image already imported ``docker pull ubuntu``.
15
+
We will use the ubuntu image to run a simple hello world daemon that will just print hello world to standard
16
16
out every second. It will continue to do this until we stop it.
17
17
18
18
**Steps:**
19
19
20
20
.. code-block:: bash
21
21
22
-
CONTAINER_ID=$(docker run -d base /bin/sh -c "while true; do echo hello world; sleep 1; done")
22
+
CONTAINER_ID=$(docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done")
23
23
24
-
We are going to run a simple hello world daemon in a new container made from the base image.
24
+
We are going to run a simple hello world daemon in a new container made from the ubuntu image.
25
25
26
26
- **"docker run -d "** run a command in a new container. We pass "-d" so it runs as a daemon.
27
-
- **"base"** is the image we want to run the command inside of.
27
+
- **"ubuntu"** is the image we want to run the command inside of.
28
28
- **"/bin/sh -c"** is the command we want to run in the container
29
29
- **"while true; do echo hello world; sleep 1; done"** is the mini script we want to run, that will just print hello world once a second until we stop it.
30
30
- **$CONTAINER_ID** the output of the run command will return a container id, we can use in future commands to see what is going on with this process.
0 commit comments