Skip to content

Commit 6f40e51

Browse files
committed
Document --platform flag in README.md
1 parent 27676b1 commit 6f40e51

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,22 @@ kubectl logs kodata
439439
2018/07/19 23:38:29 Hello there
440440
```
441441

442+
## Multi-Platform Images
443+
444+
If `ko` is invoked with `--platform=all`, for any image that it builds that is
445+
based on a multi-architecture image (e.g., the default
446+
`gcr.io/distroless/static:nonroot`, `busybox`, `alpine`, etc.), `ko` will
447+
attempt to build the Go binary using Go's cross-compilation support and produce
448+
a multi-architecture [image
449+
index](https://github.com/opencontainers/image-spec/blob/master/image-index.md)
450+
(aka "manifest list"), with support for each OS and architecture pair supported
451+
by the base image.
452+
453+
If `ko` is invoked with `--platform=<some-OS>/<some-platform>` (e.g.,
454+
`--platform=linux/amd64` or `--platform=linux/arm64`), then it will attempt to
455+
build an image for that OS and architecture only, assuming the base image
456+
supports it.
457+
442458
## Enable Autocompletion
443459

444460
To generate an bash completion script, you can run:

0 commit comments

Comments
 (0)