Merge pull request #125536 from this-is-yaash/documentation-enhance

enhanced the docker build documentation for readability and clarity
This commit is contained in:
Kubernetes Prow Robot 2024-06-25 08:26:08 -07:00 committed by GitHub
commit 8b72795621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,11 +18,26 @@ You must install and configure Google Cloud SDK if you want to upload your relea
## Overview ## Overview
While it is possible to build Kubernetes using a local golang installation, we have a build process that runs in a Docker container. This simplifies initial set up and provides for a very consistent build and test environment. You can build Kubernetes in two environments:
1. **Local `Go`** Environment, and
2. **Docker Container** Environment
Building Kubernetes in a Docker container **simplifies the initial set-up** and provides a very consistent build and test environment.
## Clone the Repository
Before you start building Kubernetes, make sure to clone the repository using the following command:
```bash
git clone https://github.com/kubernetes/kubernetes.git
```
Navigate to Kubernetes directory before executing scripts files:
```bash
cd kubernetes
```
## Key scripts ## Key scripts
**Note:** Ensure you run all the scripts from the Kubernetes root directory.
The following scripts are found in the [`build/`](.) directory. Note that all scripts must be run from the Kubernetes root directory. The following scripts are found in the [`build/`](.) directory.
* [`build/run.sh`](run.sh): Run a command in a build docker container. Common invocations: * [`build/run.sh`](run.sh): Run a command in a build docker container. Common invocations:
* `build/run.sh make`: Build just linux binaries in the container. Pass options and packages as necessary. * `build/run.sh make`: Build just linux binaries in the container. Pass options and packages as necessary.