Hello world in a container (Engine)

Hello world in a container

So what’s this Docker thing all about?

Docker allows you to run applications, worlds you create, inside containers. Running an application inside a container takes a single command: docker run.

Note: Depending on your Docker system configuration, you may be required to preface each docker command on this page with sudo. To avoid this behavior, your system administrator can create a Unix group called docker and add users to it.

Run a Hello world

Let’s try it now.

$ docker run ubuntu /bin/echo 'Hello world'
Hello world

And you just launched your first container!

So what just happened? Let’s step through what the docker run command did.

First we specified the docker binary and the command we wanted to exec