RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
247 stars 71 forks source link

Use fixed versions of CPAN distributions for rebuilding Docker images #3617

Open bschmalhofer opened 1 month ago

bschmalhofer commented 1 month ago

When the check for changes in the base images is implemented then there will be fairly frequent rebuilds of Docker images. These rebuilds include the installation of CPAN distributions into the Docker image. Currently most of the CPAN dependencies are installed with their most current versions on CPAN. This is fine for infrequent builds as there the builds are tested before they are tagged and built automatically on Docker Hub. For rebuilding already released versions we want a more stable setup. Specifically we want that the same versions of CPAN distrubutions are installed into the rebuilt image. This can be achieved with cpanfile.snapshot support in Carton.

See also #210.

Originally posted by @bschmalhofer in https://github.com/RotherOSS/otobo/issues/3448#issuecomment-2233043883

bschmalhofer commented 1 month ago

The inital approach is that local build update cpanfile,snapshot and that the automated builds use it.

TODO:

bschmalhofer commented 1 month ago

The automated builds initially did not accept the heredoc syntax in the Dockerfile otobo.web.dockerfile . Declaring the Dockerfile frontend in the Dockerfile did the trick.

$ more otobo.web.dockerfile -n 5
# syntax=docker/dockerfile:1.9

# This is the build file for the OTOBO web docker image.
# The services OTOBO web and OTOBO daemon use the same image.
# There is also an extra build target otobo-web-kerberos that adds support for Kerberos.
bschmalhofer commented 1 month ago

There still is a problem. When changes from one branch are merged the next higher version branch, e.b. rel-10_1 merged into rel-11_0, then cpanfile.docker.snapshot would also be merged. Excluding files from git merge is not trivially possible.