Our great sponsors
-
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.
-
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.
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.
Ther very first step is actions/checkout@v2 action, which take the latest code from the master branch.
Second step is docker/setup-qemu-action which installs QEMU static binaries, which are used to run builders for architectures other than the host.
Third step is docker/setup-buildx-action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.
Third step is docker/setup-buildx-action configures buildx, which is a Docker CLI plugin that provides enhanced build capabilities.
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.
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.
Related posts
- Dockerize and Deploy a NodeJS Application to Cloud Run with GitHub Actions
- Automating Tag Creation, Release, and Docker Image Publishing with GitHub Actions
- Where do you commit files for containers that run CI scripts?
- Automated Docker Image Build
- Deployment to Digital Ocean with Github Actions and Docker Compose