Skip to content

Comments

docker: Update Ubuntu to 24.04#6410

Merged
echoix merged 9 commits intoOSGeo:mainfrom
ninsbl:docker_ubuntu_24
Oct 4, 2025
Merged

docker: Update Ubuntu to 24.04#6410
echoix merged 9 commits intoOSGeo:mainfrom
ninsbl:docker_ubuntu_24

Conversation

@ninsbl
Copy link
Member

@ninsbl ninsbl commented Sep 26, 2025

This PR updates the Ubuntu Dockerfile to use Ubuntu 24.04 as base image.
Usage of dynamic ARG is moved further down in the build process to not invalidate build cache.
The README has been updated to reflect the recent changes and esp. document how dynamic ARGs can be used to assign meaningful labels to the resulting docker image.

@github-actions github-actions bot added docker Docker related docs markdown Related to markdown, markdown files labels Sep 26, 2025
@ninsbl ninsbl added this to the 8.5.0 milestone Sep 29, 2025
@ninsbl
Copy link
Member Author

ninsbl commented Sep 29, 2025

As for the discussion on having a "DIGEST" label:
I added it because it is part of OCI standard annotations. Personally, I am not depending on it, but I can imagine it being useful to have the digest of the base image in downstream images. It may help to make sure that multi-stage builds downsteams (e.g. actinia) can add stuff using the same base image... Just my not very educated idea of a possible use case ...

In order to keep the DIGEST (and BASE_NAME arg) up to date we may add something like the following to renovate configuration (not tested and no idea if that is enough):

{
  "regexManagers": [
    {
      "fileMatch": ["Dockerfile"],
      "matchStrings": [
        "ARG BASE_NAME=(?<depName>.*?):(?<currentVersion>.*?)\\s",
        "ARG DIGEST=(?<currentDigest>.*?)\\s"
      ],
      "datasourceTemplate": "docker",
      "versioningTemplate": "docker"
    }
  ]
}

That said, I can remove those labels if you feel it is not worth the hassle...

@ninsbl ninsbl requested a review from echoix September 29, 2025 09:09
@echoix
Copy link
Member

echoix commented Sep 29, 2025

As for the discussion on having a "DIGEST" label:

I added it because it is part of OCI standard annotations. Personally, I am not depending on it, but I can imagine it being useful to have the digest of the base image in downstream images. It may help to make sure that multi-stage builds downsteams (e.g. actinia) can add stuff using the same base image... Just my not very educated idea of a possible use case ...

In order to keep the DIGEST (and BASE_NAME arg) up to date we may add something like the following to renovate configuration (not tested and no idea if that is enough):


{

  "regexManagers": [

    {

      "fileMatch": ["Dockerfile"],

      "matchStrings": [

        "ARG BASE_NAME=(?<depName>.*?):(?<currentVersion>.*?)\\s",

        "ARG DIGEST=(?<currentDigest>.*?)\\s"

      ],

      "datasourceTemplate": "docker",

      "versioningTemplate": "docker"

    }

  ]

}

That said, I can remove those labels if you feel it is not worth the hassle...

The regex you show here might be missing something to match back to what to lookup for. I have some complex setup in the Megalinter repo where I extended the default common regex of Dockerfile to our custom yaml format and docs, so most of the updates are done at the right places. They have an example in their docs (unless they removed it since) where they show a common regex to start with, and to try to keep the same conventions as it allows the maximum configurability in most cases.

It usually involves having a comment in the line above to add the extra data.

Copy link
Member

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going as is. If we were to iterate, I think trying to avoid mentioning the image size would help not getting that info stale. And maybe double check that the download size is really 2.6 GB. There is a difference between the downloaded size, and the size of the built image non compressed. (And once extracted).

@echoix echoix merged commit f42c2d1 into OSGeo:main Oct 4, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker related docs markdown Related to markdown, markdown files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants