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

Document --platform flag in README.md #211

Merged
merged 1 commit into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,25 @@ kubectl logs kodata
2018/07/19 23:38:29 Hello there
```

## Multi-Platform Images

If `ko` is invoked with `--platform=all`, for any image that it builds that is
based on a multi-architecture image (e.g., the default
`gcr.io/distroless/static:nonroot`, `busybox`, `alpine`, etc.), `ko` will
attempt to build the Go binary using Go's cross-compilation support and produce
a multi-architecture [image
index](https://github.com/opencontainers/image-spec/blob/master/image-index.md)
(aka "manifest list"), with support for each OS and architecture pair supported
by the base image.

If `ko` is invoked with `--platform=<some-OS>/<some-platform>` (e.g.,
`--platform=linux/amd64` or `--platform=linux/arm64`), then it will attempt to
build an image for that OS and architecture only, assuming the base image
supports it.

When `--platform` is not provided, `ko` builds an image with the OS and
architecture based on the build environment's `GOOS` and `GOARCH`.

## Enable Autocompletion

To generate an bash completion script, you can run:
Expand Down