Uh oh!
There was an error while loading. Please reload this page.
Self-contained docker build with ARM64 publishing - #3962
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Gedochao
left a comment
There was a problem hiding this comment.
@tgodzik@zielinsky can you take a look as well? I think it'd be good to have another pair of eyes on this (or two)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Gedochao
commented
Nov 19, 2025
Static and mostly static images are in the understanding of GraalVM, as per this doc: https://www.graalvm.org/21.3/reference-manual/native-image/StaticImages/index.html
What particular customisation for Linux x86 did you mean?
Shoot away, I'll try to answer, or at least direct you in the direction of an answer. What's there in this area was initially coded by @alexarchambault (who's also the author of |
tgodzik
left a comment
There was a problem hiding this comment.
I don't know much about this, I only built basic docker images. Overall look ok as long as it work 😅
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
keynmol
commented
Nov 21, 2025
This line threw me off |
Gedochao
commented
Nov 21, 2025
Just to make sure. We currently have the following images, which are updated with each Scala CLI release: @keynmol your intention is to create a third one, yes? |
Gedochao
commented
Nov 21, 2025
Also, how can we safely test this? |
Gedochao
commented
Nov 21, 2025
Okay... sounds reasonable. |
The CI is green. |
Actually scratch that, in this instance it won't have any effect, I will update |
Gedochao
commented
Nov 25, 2025
@zielinsky I will wait for your okay before clicking |
keynmol
commented
Nov 25, 2025
I think so, no doubt it will require more iterations when the work flow actually runs :) |
zielinsky
left a comment
There was a problem hiding this comment.
One question from me before approval.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
keynmol
commented
Dec 22, 2025
Workflow succeeded, and the image is published correctly, containing two platform-specific images: https://github.com/VirtusLab/scala-cli/actions/runs/20428482272/job/58694886877#step:7:1 But I think the visibility of packages needs to be changed in repository and package settings |

Fixes#2132
At the moment, the scala-cli docker image is built using a combination of mill tasks, scripts, and dockerfiles that require externally built binary. What's more, it's only built for x86.
With ARM64 runners on GHA being GA, I propose a simplification - a self-contained multi-stage dockerfile, with a custom Github Workflow that merges the images into a single manifest, meaning that docker will pull the correct image no matter the target platform.
Manifest merging and pushing is a complicated step, and Docker have been amending their docs with the example, which is what this workflow is based on.
I've been using this setup in multiple apps, e.g. Mimalyzer.
There are some aspects of the build I don't really understand – static, mostly static images, customisation for Linux x86, etc.
This proposal attempts to do the simplest possible thing, so that building a docker image is just
docker build . -t VirtusLab/scala-cli.Currently, it only publishes to ghcr.io to test out the workflows without disturbing the main image on docker hub. But additional publishing steps are easily added, of course