Creating your first Docker container

Just to get a feel of Docker, let's run a sample hello-world container, which we tried to do earlier without success.

The hello-world image is not available locally, so it will be fetched from Docker Hub:

            [root@localhost Desktop]# docker run hello-world
            Unable to find image 'hello-world:latest' locally
            latest: Pulling from hello-world
            d59cd4c39e50: Pull complete 
            f1d956dc5945: Pull complete 
            Digest:         sha256:4f32210e234b4ad5cac92efacc0a3d602b02476c754f13d517e1ada048e5a8ba
            Status: Downloaded newer image for hello-world:latest
            Hello from Docker.

This message shows that your installation appears to be working correctly.

To generate this message, ...

Get DevOps for Web Development 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.