hello_world.rst 1017 B

12345678910111213141516171819202122232425262728293031323334
  1. :title: Docker: Hello world example
  2. :description: A simple hello world example with Docker
  3. :keywords: docker, example, hello world
  4. .. _hello_world:
  5. Hello World
  6. ===========
  7. This is the most basic example available for using docker
  8. This example assumes you have Docker installed and it will download the busybox image and then use that image to run a simple echo command, that will echo hello world back to the console over standard out.
  9. .. code-block:: bash
  10. $ docker run busybox /bin/echo hello world
  11. **Explanation:**
  12. - **"docker run"** run a command in a new container
  13. - **"busybox"** is the image we want to run the command inside of.
  14. - **"/bin/echo"** is the command we want to run in the container
  15. - **"hello world"** is the input for the echo command
  16. **Video:**
  17. See the example in action
  18. .. raw:: html
  19. <div style="margin-top:10px;">
  20. <iframe width="560" height="350" src="http://ascii.io/a/2561/raw" frameborder="0"></iframe>
  21. </div>
  22. Continue to the :ref:`hello_world_daemon` example.