The Wayback Machine - https://web.archive.org/web/20210205061039/https://github.com/google/ko/issues/207
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support "scratch" as a special base image #207

Open
mattmoor opened this issue Sep 29, 2020 · 8 comments
Open

support "scratch" as a special base image #207

mattmoor opened this issue Sep 29, 2020 · 8 comments

Comments

@mattmoor
Copy link
Collaborator

@mattmoor mattmoor commented Sep 29, 2020

Something like ko.yaml:

defaultBaseImage: scratch
@mattmoor
Copy link
Collaborator Author

@mattmoor mattmoor commented Sep 29, 2020

cc @jonjohnsonjr

I think the hardest part of this now would be determining what to do for --platform=all 🤣

@transhapHigsn
Copy link

@transhapHigsn transhapHigsn commented Oct 10, 2020

@mattmoor Can I pick this up?

@jonjohnsonjr
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr commented Nov 10, 2020

@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
Copy link
Collaborator Author

@mattmoor mattmoor commented Nov 10, 2020

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? 😅

@jonjohnsonjr
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr commented Nov 10, 2020

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
        }
]
@mattmoor
Copy link
Collaborator Author

@mattmoor mattmoor commented Nov 10, 2020

Challenge accepted? 😅

@jonjohnsonjr
Copy link
Collaborator

@jonjohnsonjr jonjohnsonjr commented Nov 10, 2020

Would love to see how you plan to test your plan9/386 container images.

@transhapHigsn
Copy link

@transhapHigsn transhapHigsn commented Nov 12, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants