You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The golang:1.17 base image provides platform-specific Linux and Windows images, and even a number of different Windows images for different Windows versions:
For GitHub Actions to work, ko needs to select the middle one, for os.version: 10.0.17763.2300 (or any 10.0.17763, probably). But --platform=amd64/windows will naively select the first one, and produce an image that doesn't run on GitHub Actions' windows-latest. --platform=all would work, it would simply build more images than it needs, including one for the correct 10.0.17763 image. Even if the correct image was listed first, there's no guarantee that golang won't change the order and break us, so we should be explicit about which one we match and build on.
This is similar in spirit to google/go-containerregistry#1173 which added an --osversion flag to crane to take the os.version into account when matching a platform. ko's support should work in much the same way.
Discovered while testing #533
The
golang:1.17
base image provides platform-specific Linux and Windows images, and even a number of different Windows images for different Windows versions:For GitHub Actions to work,
ko
needs to select the middle one, foros.version: 10.0.17763.2300
(or any10.0.17763
, probably). But--platform=amd64/windows
will naively select the first one, and produce an image that doesn't run on GitHub Actions'windows-latest
.--platform=all
would work, it would simply build more images than it needs, including one for the correct10.0.17763
image. Even if the correct image was listed first, there's no guarantee thatgolang
won't change the order and break us, so we should be explicit about which one we match and build on.This is similar in spirit to google/go-containerregistry#1173 which added an
--osversion
flag tocrane
to take theos.version
into account when matching a platform.ko
's support should work in much the same way.@jonjohnsonjr
The text was updated successfully, but these errors were encountered: