Skip to main content

Development

Automating Docker Image builds

Why automate?

  • Similar to any other automation, we get consistent results once we have automation in place.
  • It speeds up the development process.
  • You can produce the same result by following the same steps, so there is less of a change that it will work sometimes and not work other times.

What is required to automate?

Dockerfile – Docker file contains the steps to produce the Docker image. These steps include things like: what base image, if other installations are required, installing your app etc.

Depending on the requirements, we use an existing image to build a new image such as MyAppV1, MyAppV2 etc.

Any CI/CD tool like Jenkins – Tools like Jenkins can help you schedule your task, send notifications, run tasks from script etc.

Automated test suite – Run some tests to make sure your Docker image is really useful or does what we intended to do.

Docker registry – Once the Docker Image looks good, we can upload it to the Docker registry so that it can be used by others.

Overall Workflow-

dockerimageautomation

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Susheel Kumar

More from this Author

Categories
Follow Us