https://github.com/paketo-buildpacks/go
A Cloud Native Buildpack for Go
https://github.com/paketo-buildpacks/go
cnb golang
Last synced: about 2 months ago
JSON representation
A Cloud Native Buildpack for Go
- Host: GitHub
- URL: https://github.com/paketo-buildpacks/go
- Owner: paketo-buildpacks
- License: apache-2.0
- Created: 2020-04-13T20:16:43.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2026-01-12T16:34:17.000Z (about 2 months ago)
- Last Synced: 2026-01-12T18:50:20.742Z (about 2 months ago)
- Topics: cnb, golang
- Language: Go
- Homepage:
- Size: 82.8 MB
- Stars: 91
- Watchers: 2
- Forks: 17
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Notice: NOTICE
Awesome Lists containing this project
- awesome-cnb - Golang
- awesome-repositories - paketo-buildpacks/go - A Cloud Native Buildpack for Go (Go)
README
# Go Paketo Buildpack
## `docker.io/paketobuildpacks/go`
The Go Paketo Buildpack provides a set of collaborating buildpacks that
enable the building of a Go-based application. These buildpacks include:
- [Go Distribution CNB](https://github.com/paketo-buildpacks/go-dist)
- [Go Mod Vendor CNB](https://github.com/paketo-buildpacks/go-mod-vendor)
- [Go Build CNB](https://github.com/paketo-buildpacks/go-build)
The buildpack supports building applications that use either the built-in [Go
modules](https://golang.org/cmd/go/#hdr-Module_maintenance) feature for managing
their dependencies. Usage examples can be found in the
[`samples` repository under the `go` directory](https://github.com/paketo-buildpacks/samples/tree/main/go).
#### The Go buildpack is compatible with the following builder(s):
- [Paketo Jammy Full Builder](https://github.com/paketo-buildpacks/builder-jammy-full)
- [Paketo Jammy Base Builder](https://github.com/paketo-buildpacks/builder-jammy-base)
- [Paketo Jammy Tiny Builder](https://github.com/paketo-buildpacks/builder-jammy-tiny)
- [Paketo Jammy Static Buildpackless Builder](https://github.com/paketo-buildpacks/builder-jammy-buildpackless-static)†
- [Paketo Full Builder](https://github.com/paketo-buildpacks/full-builder)
- [Paketo Base Builder](https://github.com/paketo-buildpacks/base-builder)
- [Paketo Tiny Builder](https://github.com/paketo-buildpacks/tiny-builder)
This buildpack also includes the following utility buildpacks:
- [Git CNB](https://github.com/paketo-buildpacks/git)
- [Procfile CNB](https://github.com/paketo-buildpacks/procfile)
- [Environment Variables CNB](https://github.com/paketo-buildpacks/environment-variables)
- [Image Labels CNB](https://github.com/paketo-buildpacks/image-labels)
- [CA Certificates CNB](https://github.com/paketo-buildpacks/ca-certificates)
Check out the [Go Paketo Buildpack docs](https://paketo.io/docs/buildpacks/language-family-buildpacks/go/) for more information.
† To build with the static buildpackless builder, use the following command:
```
pack build \
--builder paketobuildpacks/builder-jammy-buildpackless-static \
--buildpack paketo-buildpacks/go \
--env "CGO_ENABLED=0" \
--env "BP_GO_BUILD_FLAGS=-buildmode=default"
```