1
0
mirror of https://github.com/docker/cli.git synced 2026-01-16 20:22:36 +03:00
Files
cli/components/engine/docs/sources/examples/hello_world.rst
Thatcher Peskens 318f58e654 Added code and color for 'note' and updated the hello world note.
Upstream-commit: 2832ea0cfeb8eb69cf42db5ec0a115300e1383b9
Component: engine
2013-04-08 20:10:47 -07:00

1.2 KiB

title
Hello world example
description
A simple hello world example with Docker
keywords
docker, example, hello world

Hello World

This is the most basic example available for using Docker.

Download the base container

# Download a base image
docker pull base

The base image is a minimal ubuntu based container, alternatively you can select busybox, a bare minimal linux system. The images are retrieved from the docker repository.

#run a simple echo command, that will echo hello world back to the console over standard out.
docker run base /bin/echo hello world

Explanation:

  • "docker run" run a command in a new container
  • "base" is the image we want to run the command inside of.
  • "/bin/echo" is the command we want to run in the container
  • "hello world" is the input for the echo command

Video:

See the example in action

Continue to the hello_world_daemon example.