Docker Hub Hello World

docker_ryu-e1431444592428.png

I sat down this weekend with the intention of putting my own Docker Hub image on Amazon Web Services (AWS). I planned to piggy back what I had learned in my previous post Getting Docker Running On AWS.

I quickly realized I was trying to run before I knew how to walk. I dug around the Docker website and found a fantastic tutorial on how create a hello world style Docker Hub repository – https://docs.docker.com/mac/.

You can find similar Docker installation for Windows and Linux.

Docker Installed

Reference the “Let’s Get Started Locally!” section in Getting Docker Running On AWS.

Find and Run

The next section, Find and run the whalesay image, walks the user through how to search and run a particular Docker image. We implicitly touched on this in my previous Docker post.

This section is nice as it explicitly explains the steps necessary to search and find images. In addition it helps the user to understand how to run a image, then run subsequent commands on the created container.

Creating a Dockerfile

Once we are comfortable finding and running an image, Build your own image takes us to the next level. How to create a Dockerfile.

Once again, the tutorial is pretty solid. It gives step by step instructions on how to create a Dockerfile based upon the previously loaded docker/whalesay image. I really like how the author walks through the necessary commands, then explains each step’s purpose in detail.

Screen Shot 2016-04-08 at 11.35.07 PM

Create a DockerHub Account

It’s pretty self explanatory, but here is the link : Create a Docker Hub account & repository

Profit! (Tag and Push)

The next section is where a lot of the magic happens, Tag, push, and pull your image. The commands are relatively simple. The tutorial walks through tagging an image, logging in via the docker command, and then pushing up to Docker Hub.

https://hub.docker.com/r/dev3l/docker-whale/

docker run dev3l/docker-whale

Screen Shot 2016-04-09 at 12.22.54 AM

Conclusion

We now have a Docker image that anyone can pull down and run.

What are our next steps? Looking at Docker Hub, I notice there is no Dockerfile in my repository. Why is that?

At the end of the Docker getting started tutorial, there is a section for Learning more. I Googled searched quickly, and in order to get your Dockerfile published and available, we need to create an automated build.

With that said, Automated Builds on Docker Hub (Coming soon)!

2 thoughts on “Docker Hub Hello World

  1. Pingback: Docker Hub Automated Build | Software Dev3loper

  2. Pingback: Continuous Delivered Using Docker – A React.js Application | Software Dev3loper

Leave a comment