quinta-feira, 9 de junho de 2016

Docker Hub, save and share your docker images

The Docker Hub is a cloud-based registration service for the construction of container applications or services.

It provides a centralized resource for image container discovery, distribution and change management, user and team collaboration and workflow automation throughout the development pipeline.

Docker hub provides the following features:

     Image Repository -Find, manage and push and pull of community images, official and private image libraries.

     Automated Build - automatically create new images when you make changes to a code that is on GitHub or bit bucket.

     Webhooks - A feature of Automated builds, Webhooks let you trigger actions after a successful push’s too a repository.

     Organization - Create working groups to manage user access to repositories of images.

Public Repository:

Sending image to own repository:

Here I got an existed image.

I logged in my docker hub account.

I put the my tag to send to my account

Now I have two images, the original and my own version.

In the end I did push to repository.

If I check my docker hub account, is possible seeing the image that I sent.


The webhook is an HTTP callback triggered by a specific event.
You can use a webhook to notify people, services and other applications after a new image is sent to your repository.

To start adding webhooks, scroll to the desired repository in Hub and click "Webhooks" under the "Settings" box.

The webhook is called only after a successful push is made.

Calls webhook are HTTP POST requests with a JSON payload similar to the example shown below.


After create my webhook I will have this image below:


Just for test this webhook I used this site: http://requestb.in

This site will provide one URL to put on WebHook URL and this site provide another URL to check Request received like this:

Automated build

You can build your images automatically from a compilation context stored in a repository.

A building context is a Docker File and any files in the specific location.

For an automated build the building context is a repository where it sends a Docker File.

Use of automated builds requires that you have an account on Docker Hub and hosted repository provider  GitHub or BitBucket.

If you already have on your Github or BitBucket account, you must have chosen the type of public and private connection.


After each commit that happen on git repository mapped is possible see this table with status about each image build with code committed. 


And is possible combine Automated Build with WebHooks and the result for this could be a deploy in someplace.

These functionalities for Webhooks and Automated Build are limited in private mode, for each user is available 1 Private Repo & Parallel Build, and this pipeline not happen immediately for free account.

My Slides


Nenhum comentário:

Postar um comentário