Container Images
Container/Docker Images¶
All container images used in this course should be build using Docker. The images should be built using the latest version of the base image available on Docker Hub. The container images should be stored in a private Docker repository on Docker Hub.
DockerHub Plan¶
All teams must sign up for Docker Team
plan on Docker Hub. This plan allows you to create private repositories and store your container images securely. Each team member must have a Docker Hub account and be added to the team. Sign up for the Docker Team plan.
DockerHub Repository¶
Each container image must be stored in a dedicated private
Docker repository on Docker Hub. Do not publish container images for different applications in the same repository. Each repository should be named according to the application it contains. For example, if you are building a container image for a web application, the repository name should be web-app
.
Multi-Platform Container Images¶
All container images must be built for multiple platforms, including linux/amd64
and linux/arm64
. This can be achieved using Docker Buildx
, which allows you to build images for different architectures.
Continuous Integration & DockerHub Repository¶
For each container image, you must set up a Continuous Integration (CI) pipeline using Jenkins that builds and publishes the image to Docker Hub.
- Create a Jenkins job using Jenkins DSL to build and publish multi-platform container image to Docker hub.
- The Docker repository & container image should be private.
- Configure webhook to trigger Jenkins job when either a pull request is raised or a new commit is merged to the
main
branch of the repository. - Use semantic-release to create a GitHub release for the container image when pull request is merged to the
main
branch. - Container images build during pull request status check should not have the
latest
tag. Thelatest
tag should only be applied to the container image when it is merged to themain
branch. - The container image should be tagged with the git commit SHA, semantic release version, and the
latest
tag when it is merged to themain
branch.