mirror of
https://github.com/imjasonh/combine
synced 2026-07-08 04:44:52 +00:00
add crane exampleg
This commit is contained in:
parent
6391788f43
commit
58477c7ad2
1 changed files with 37 additions and 1 deletions
38
README.md
38
README.md
|
|
@ -7,7 +7,7 @@ It fails if both images provide the same platforms, or if either isn't a manifes
|
|||
# demo
|
||||
|
||||
```
|
||||
go run ./ \
|
||||
$ go run ./ \
|
||||
gcr.io/distroless/static:nonroot \
|
||||
mcr.microsoft.com/windows/nanoserver:1809 \
|
||||
gcr.io/imjasonh/combined
|
||||
|
|
@ -15,5 +15,41 @@ go run ./ \
|
|||
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue