Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imjasonh/combine
combine multi-platform images
https://github.com/imjasonh/combine
Last synced: about 1 month ago
JSON representation
combine multi-platform images
- Host: GitHub
- URL: https://github.com/imjasonh/combine
- Owner: imjasonh
- Created: 2021-06-08T14:44:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-30T18:59:31.000Z (over 3 years ago)
- Last Synced: 2024-10-14T16:50:54.969Z (3 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# combine manifest lists
This tool combines two Docker manifest lists ("multi-arch images") into one that provides all the platforms supported by both manifest lists.
It fails if both images provide the same platforms, or if either isn't a manifest list.
# demo
```
$ go run ./ \
gcr.io/distroless/static:nonroot \
mcr.microsoft.com/windows/nanoserver:1809 \
gcr.io/imjasonh/combined
```This combines the [distroless](https://github.com/googlecontainertools/distroless) image providing linux platform support with an image providing Windows support.
You can check the image's platforms using [`crane`](https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md):
```
$ crane manifest gcr.io/imjasonh/combined | jq '.manifests[].platform'
{
"architecture": "amd64",
"os": "linux"
}
{
"architecture": "arm",
"os": "linux"
}
{
"architecture": "arm64",
"os": "linux"
}
{
"architecture": "ppc64le",
"os": "linux"
}
{
"architecture": "s390x",
"os": "linux"
}
{
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.17763.1935"
}
{
"architecture": "arm",
"os": "windows",
"os.version": "10.0.17763.1935"
}
```The result is an image that provides support for both.
This image is intended to be suitable as a base image used with `ko` to provide multi-arch _and multi-OS_ support for a Go application.