1
0
mirror of https://github.com/ko-build/ko.git synced 2025-11-23 22:35:11 +02:00
Files
ko-build/docs/features/multi-platform.md
Jason Hall 43cdbd25fb update docs: fix broken links, align with README (#854)
* update docs: fix broken links, align with README

* update google/ko references that can be updated
2022-10-18 14:30:34 -04:00

727 B

Multi-Platform Images

Because Go supports cross-compilation to other CPU architectures and operating systems, ko excels at producing multi-platform images.

To build and push an image for all platforms supported by the configured base image, simply add --platform=all. This will instruct ko to look up all the supported platforms in the base image, execute GOOS=<os> GOARCH=<arch> GOARM=<variant> go build for each platform, and produce a manifest list containing an image for each platform.

You can also select specific platforms, for example, --platform=linux/amd64,linux/arm64.

ko also has experimental support for building for Windows images. See FAQ.