github.com/GoogleContainerTools/skaffold/v2@v2.13.2/docs-v1/content/en/docs/tutorials/custom-builder.md (about) 1 --- 2 title: "Building Artifacts with a Custom Build Script" 3 linkTitle: "Custom Build Script" 4 weight: 100 5 --- 6 7 This page describes building Skaffold artifacts using a custom build script, which builds images using [ko](https://github.com/google/ko). 8 ko builds containers from Go source code, without the need for a Dockerfile or 9 even installing Docker. 10 11 ## Before you begin 12 13 First, you will need to have Skaffold and a Kubernetes cluster set up. 14 To learn more about how to set up Skaffold and a Kubernetes cluster, see the [quickstart docs]({{< relref "/docs/quickstart" >}}). 15 16 ## Tutorial - Hello World in Go 17 18 This tutorial will be based on the [custom example](https://github.com/GoogleContainerTools/skaffold/tree/main/examples/custom) in our repository. 19 20 21 ## Adding a Custom Builder to Your Skaffold Project 22 23 We'll need to configure your Skaffold config to build artifacts with [ko](https://github.com/google/ko). 24 To do this, we will take advantage of the [custom builder]({{<relref "/docs/pipeline-stages/builders/custom" >}}) in Skaffold. 25 26 First, add a `build.sh` file which Skaffold will call to build artifacts: 27 28 {{% readfile file="samples/builders/custom-buildpacks/build.sh" %}} 29 30 Then, configure artifacts in your `skaffold.yaml` to build with `build.sh`: 31 32 {{% readfile file="samples/builders/custom-buildpacks/skaffold.yaml" %}} 33 34 List the file dependencies for each artifact; in the example above, Skaffold watches all files in the build context. 35 For more information about listing dependencies for custom artifacts, see the documentation [here]({{<relref "/docs/pipeline-stages/builders/custom#dependencies-from-a-command" >}}). 36 37 You can check custom builder is properly configured by running `skaffold build`. 38 This command should build the artifacts and exit successfully.