ko
ko copied to clipboard
support "scratch" as a special base image
Something like ko.yaml
:
defaultBaseImage: scratch
cc @jonjohnsonjr
I think the hardest part of this now would be determining what to do for --platform=all
🤣
@mattmoor Can I pick this up?
@transhapHigsn I don't think github reactions generate any notification or email, so I wanted to reply with an explicit "yes" if you are still interested in picking this up.
Using empty.Image
from https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty should be a good place to start.
I think we should sort out what we want to do for multi-arch first?
Is there a way to enumerate all of the platform combination the Go toolchain supports? 😅
No mention of GOARM anywhere, so variants would be up to us. Also this is an enormous list (41 combinations) and we should probably not support everything. Would be a good use case for comma-separated --platform
or we could warn if --platform=all
and the base is scratch
.
$ go tool dist list -json
[
{
"GOOS": "aix",
"GOARCH": "ppc64",
"CgoSupported": true
},
{
"GOOS": "android",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "android",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "android",
"GOARCH": "arm",
"CgoSupported": true
},
{
"GOOS": "android",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "darwin",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "darwin",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "dragonfly",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "freebsd",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "freebsd",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "freebsd",
"GOARCH": "arm",
"CgoSupported": true
},
{
"GOOS": "freebsd",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "illumos",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "js",
"GOARCH": "wasm",
"CgoSupported": false
},
{
"GOOS": "linux",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "arm",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "mips",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "mips64",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "mips64le",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "mipsle",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "ppc64",
"CgoSupported": false
},
{
"GOOS": "linux",
"GOARCH": "ppc64le",
"CgoSupported": true
},
{
"GOOS": "linux",
"GOARCH": "riscv64",
"CgoSupported": false
},
{
"GOOS": "linux",
"GOARCH": "s390x",
"CgoSupported": true
},
{
"GOOS": "netbsd",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "netbsd",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "netbsd",
"GOARCH": "arm",
"CgoSupported": true
},
{
"GOOS": "netbsd",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "openbsd",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "openbsd",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "openbsd",
"GOARCH": "arm",
"CgoSupported": true
},
{
"GOOS": "openbsd",
"GOARCH": "arm64",
"CgoSupported": true
},
{
"GOOS": "plan9",
"GOARCH": "386",
"CgoSupported": false
},
{
"GOOS": "plan9",
"GOARCH": "amd64",
"CgoSupported": false
},
{
"GOOS": "plan9",
"GOARCH": "arm",
"CgoSupported": false
},
{
"GOOS": "solaris",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "windows",
"GOARCH": "386",
"CgoSupported": true
},
{
"GOOS": "windows",
"GOARCH": "amd64",
"CgoSupported": true
},
{
"GOOS": "windows",
"GOARCH": "arm",
"CgoSupported": false
}
]
Challenge accepted? 😅
Would love to see how you plan to test your plan9/386 container images.
@transhapHigsn I don't think github reactions generate any notification or email, so I wanted to reply with an explicit "yes" if you are still interested in picking this up.
Using
empty.Image
from https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty should be a good place to start.
@mattmoor Sorry, I had some problems related to notifications. Found this out today.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.