Running the first Docker container

Now, you can start your first Docker container. It is standard practice to start with the basic Hello World! application. In the following example, we will echo Hello World! by using a busybox image, which we have already downloaded, as shown here:

$ sudo docker run busybox echo "Hello World!"
"Hello World!"

Cool, isn't it? You have set up your first Docker container in no time. In the preceding example, the docker run subcommand has been used for creating a container and for printing Hello World! by using the echo command.

Get Learning Docker now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.