Image for post
An example of how it could work.

You might not need a CI server to build your Docker Image and push it to Docker Hub.

You can create automated builds directly in Docker Hub.

Basically, it links directly to your repository, and you can manage all the docker image building settings directly from Docker Hub

When already set up, it looks like this in your Docker Hub dashboard:

Image for post
List item for armand1m/logstash-sqlserver image in my Docker Hub

You can see the automated build details:

Image for post
Image for post
Build details for armand1m/logstash-sqlserver image in Docker Hub

You can tweak the build settings and set up different tag names for different branches, even different directories for different Dockerfiles, or build triggers using Webhooks:

Image for post
Image for post
Build settings for armand1m/logstash-sqlserver image in Docker Hub

Here is a quick getting started:

Image for post
Image for post
Creating an automated build
Choose an SCM after this
Image for post
Image for post
Choose a repo to build images from
Image for post
Image for post
This is the default form for creating a new automated build for a repo.
Image for post
Image for post
You can also tweak build settings in creation time

Just create it, and every change to this repo will trigger new image building directly in Docker Hub. Easy peasy.

You can also plug in webhooks to notify interested systems when the image gets built.

Image for post
Image for post

This way you can keep your CI system more focused on just running tests instead of building up and sending your image to Docker Hub. You can notify your Kubernetes cluster (or any kind of server) to update to a newer image using Docker Hub Webhooks.

Hope it has made it clear, there is also some docs around here:

If you have any questions, don’t hesitate to comment down. Cheers! ❤

Armando is a Brazilian Software Engineer based in Amsterdam, currently working at Netflix as a Solutions Developer for the Studio in EMEA. https://armand1m.dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store