Skip to content

Commit 126c4b2

Browse files
committed
Clarify how to build for or with Windows using Docker
1 parent e26af96 commit 126c4b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Building Kubernetes is easy if you take advantage of the containerized build env
88
* **macOS** You can either use Docker for Mac or docker-machine. See installation instructions [here](https://docs.docker.com/docker-for-mac/).
99
**Note**: You will want to set the Docker VM to have at least 4.5GB of initial memory or building will likely fail. (See: [#11852]( http://issue.k8s.io/11852)).
1010
* **Linux with local Docker** Install Docker according to the [instructions](https://docs.docker.com/installation/#installation) for your OS.
11+
* **Windows with Docker Desktop WSL2 backend** Install Docker according to the [instructions](https://docs.docker.com/docker-for-windows/wsl-tech-preview/). Be sure to store your sources in the local Linux file system, not the Windows remote mount at `/mnt/c`.
1112
* **Remote Docker engine** Use a big machine in the cloud to build faster. This is a little trickier so look at the section later on.
1213
2. **Optional** [Google Cloud SDK](https://developers.google.com/cloud/sdk/)
1314

@@ -23,7 +24,7 @@ The following scripts are found in the [`build/`](.) directory. Note that all sc
2324

2425
* [`build/run.sh`](run.sh): Run a command in a build docker container. Common invocations:
2526
* `build/run.sh make`: Build just linux binaries in the container. Pass options and packages as necessary.
26-
* `build/run.sh make cross`: Build all binaries for all platforms
27+
* `build/run.sh make cross`: Build all binaries for all platforms. To build only a specific platform, add `KUBE_BUILD_PLATFORMS=<os>/<arch>`
2728
* `build/run.sh make kubectl KUBE_BUILD_PLATFORMS=darwin/amd64`: Build the specific binary for the specific platform (`kubectl` and `darwin/amd64` respectively in this example)
2829
* `build/run.sh make test`: Run all unit tests
2930
* `build/run.sh make test-integration`: Run integration test

0 commit comments

Comments
 (0)