In the previous article, I mentioned how we can Dockerise a progressive framework based application (Vue). I have made few improvements to the application where I am now able to perform CRUD operations on the client side using AXIOS, based on API’s available from the server side. I wanted to test these incremental features added to the application and imagine executing those docker commands everytime you make a new component/feature available. This is quite a task. So I was looking at ways to automate the task where every time I commit/push the code to GitHub the build happens automatically so that the latest container is ready for deployment. This is where Docker Hub comes to our rescue. Here are the steps for the automated build process:
- Register for an account on Docker Hub
- Link your Github repo with the Docker Hub under Account Settings
- Click on “Create Automated Build “and point to the GitHub Repo that has got the Docker File (Refer the previous article on how to create this Docker File).
- Make some changes to your code, do a git commit and Push the change to your GitHub Repo.
- You can see the automated build in progress as soon as the changes are committed to the repo.
- And within few minutes you can see the build is served.
As mentioned in the previous article you can go to your OCCS (Oracle Container Cloud Service) and pick up the latest build and deploy this latest Docker container available.
In the next article, I will discuss how we can automate the last part as well, where you don’t need to manually build the latest Docker Container available from Docker Hub in OCCS.