Skip to content

Comments

docker: build GUI from ubuntu using build-args#6800

Merged
echoix merged 9 commits intoOSGeo:mainfrom
ninsbl:docker_reuse_ubuntu
Dec 22, 2025
Merged

docker: build GUI from ubuntu using build-args#6800
echoix merged 9 commits intoOSGeo:mainfrom
ninsbl:docker_reuse_ubuntu

Conversation

@ninsbl
Copy link
Member

@ninsbl ninsbl commented Dec 22, 2025

This PR removes the separate Dockerfile for Ubuntu with WXGUI (in ubuntu_wxgui) and builds a docker image from the Ubuntu Dockerfile using the build-arg "GUI"

Since other OS did not use build args, unfortunately the "Build and push" step had to be duplicated to run either with build-args or without. Ideas on how to avoid that are welcome.

Please have a specific look also at caching, as I am not sure how that behaves (and if I got it right)...

@ninsbl ninsbl added this to the 8.5.0 milestone Dec 22, 2025
@ninsbl ninsbl requested a review from echoix December 22, 2025 12:21
@github-actions github-actions bot added docker Docker related CI Continuous integration docs markdown Related to markdown, markdown files labels Dec 22, 2025
@echoix
Copy link
Member

echoix commented Dec 22, 2025

Is TARGETPLATFORM a build arg that can be passed? Usually it is always defined when using Buildx for creating multi-platform images, so it would be harmless to specify here too.

Otherwise, add a somewhat dummy build arg to all other Dockerfiles, so you could pass one there.

@echoix
Copy link
Member

echoix commented Dec 22, 2025

What happens if the build arg is an empty string for the other Dockerfiles? The build-push action should be handling it, as it likely what happens when that input isn't set.

@ninsbl
Copy link
Member Author

ninsbl commented Dec 22, 2025

It seems one can just pass an unused build-argument, e.g. "GUI=without" which is true but not used or defined in the Dockerfile for alpine or debian...

@ninsbl ninsbl linked an issue Dec 22, 2025 that may be closed by this pull request
@ninsbl ninsbl enabled auto-merge (squash) December 22, 2025 14:23
@echoix echoix disabled auto-merge December 22, 2025 16:30
@echoix
Copy link
Member

echoix commented Dec 22, 2025

@ninsbl You can re-add the auto-merge with your new message now

@echoix echoix merged commit 275f431 into OSGeo:main Dec 22, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration docker Docker related docs markdown Related to markdown, markdown files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] Use common layers/dockerfile for Ubuntu wxGUI docker image

2 participants