瀏覽代碼

hello_world.md - $container_id variable case sensitivity

If you run the tutorial step-by-step, following error occurs:

```$ sudo docker logs $container_id
Usage: docker logs CONTAINER
Fetch the logs of a container
  -f, --follow=false: Follow log output```

This is obviously because bash variables are case-sensitive, so it mustn't be `CONTAINER_ID` above.

Docker-DCO-1.1-Signed-off-by: Mateusz Sulima <sulima.mateusz@email.com> (github: github_handle)
Mateusz Sulima 11 年之前
父節點
當前提交
dca1c0073f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/sources/examples/hello_world.md

+ 1 - 1
docs/sources/examples/hello_world.md

@@ -80,7 +80,7 @@ continue to do this until we stop it.
 
 **Steps:**
 
-    $ CONTAINER_ID=$(sudo docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done")
+    $ container_id=$(sudo docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done")
 
 We are going to run a simple hello world daemon in a new container made
 from the `ubuntu` image.