Building the Container

Overview

The Traefik Docker container image is built automatically using a GitLab CI runner. This build process is triggered on every push to the main branch of the repository.

Build Process

When changes are pushed to main, GitLab CI performs the following steps:

  1. Parse the Traefik version from the Dockerfile.traefik file.

  2. Build the container image using the Dockerfile.traefik.

  3. Tag the image with two tags: - :latest - :<traefik-version> (e.g., :2.10.4)

  4. Push the image to the configured container registry.

Version Detection

The Traefik version is extracted from the FROM line in the Dockerfile.traefik. For example:

FROM traefik:2.10.4

In this case, the version tag 2.10.4 will be used to tag the built image.

Usage

To trigger a build:

  • Commit your changes

  • Push to the main branch

The GitLab CI runner will take care of the rest.