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 · 9 comments · May be fixed by #1350
Open

support "scratch" as a special base image #207

mattmoor opened this issue Sep 29, 2020 · 9 comments · May be fixed by #1350
Labels

Comments

@mattmoor
Copy link
Collaborator

Something like ko.yaml:

defaultBaseImage: scratch
@mattmoor mattmoor added the good first issue Good for newcomers label Sep 29, 2020
@mattmoor
Copy link
Collaborator Author

cc @jonjohnsonjr

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

@transhapHigsn
Copy link

@mattmoor Can I pick this up?

@jonjohnsonjr
Copy link
Collaborator

@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

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

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

Challenge accepted? 😅

@jonjohnsonjr
Copy link
Collaborator

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

@transhapHigsn
Copy link

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

@github-actions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants