Pushing Cutom Images to Docker Hub using GitHub Actions

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • docker-images-example

    Very Simple Example to build Custom Docker Image

  • First, we need an application source code which we have already dockerized, in this case we will take a simple example, Here is the link of the Git Repo. In this project, we have just two file which have been used. One is 'index.html' and another is 'Dockerfile'. Assumtion is that we already know how to build and run it locally.

  • checkout

    Action for checking out a repo

  • Ther very first step is actions/checkout@v2 action, which take the latest code from the master branch.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • setup-qemu-action

    GitHub Action to install QEMU static binaries

  • Second step is docker/setup-qemu-action which installs QEMU static binaries, which are used to run builders for architectures other than the host.

  • setup-buildx-action

    GitHub Action to set up Docker Buildx

  • Third step is docker/setup-buildx-action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.

  • buildx

    Docker CLI plugin for extended build capabilities with BuildKit

  • Third step is docker/setup-buildx-action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.

  • login-action

    GitHub Action to login against a Docker registry

  • Fourth step is login (docker/login-action@v2) in to docker account, it is using username and token configured in the repository's action secret section. Then next step is building and pushing it to docker hub.

  • build-push-action

    GitHub Action to build and push Docker images with Buildx

  • Fifth step, if you will see, we are tagging (docker/build-push-action@v3) the image with 2 tags, one is the latest, so every image will pushed as latest and also as a Variable which is the Github Run Number, which is the number of build (GitHub Action)run for that repo. This way every build will create, it's own tag too and we can pull that particulat image from the dokcer hub.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts