https://github.com/buildkite/golang-docker-example
An example pipeline that runs and tests a Go project inside Docker using Buildkite.
https://github.com/buildkite/golang-docker-example
buildkite docker golang golang-docker pipeline
Last synced: 2 months ago
JSON representation
An example pipeline that runs and tests a Go project inside Docker using Buildkite.
- Host: GitHub
- URL: https://github.com/buildkite/golang-docker-example
- Owner: buildkite
- License: mit
- Created: 2016-01-25T07:07:35.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-07-18T05:47:27.000Z (3 months ago)
- Last Synced: 2025-07-28T23:46:58.893Z (2 months ago)
- Topics: buildkite, docker, golang, golang-docker, pipeline
- Language: Go
- Homepage: https://buildkite.com/buildkite/golang-docker-example/builds/latest?branch=main
- Size: 186 KB
- Stars: 19
- Watchers: 24
- Forks: 17
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Buildkite Golang Docker Pipeline Example
[](https://buildkite.com/buildkite/golang-docker-example/builds/latest?branch=main)
[](https://buildkite.com/new)This repository is an example [Buildkite](https://buildkite.com/) pipeline that runs tests for a [Golang](https://go.dev) project inside [Docker](https://docker.com).
👉 **See this example in action:** [buildkite/golang-docker-example](https://buildkite.com/buildkite/golang-docker-example/builds/latest?branch=main)
See the full [Getting Started Guide](https://buildkite.com/docs/guides/getting-started) for step-by-step instructions on how to get this running, or try it yourself:
[](https://buildkite.com/new)
## How it works
This example uses a Docker-based workflow to run Go tests:
- The pipeline runs `go test` and `go vet` inside a container.
- The container is defined using [`Dockerfile`](Dockerfile) and [`docker-compose.yml`](docker-compose.yml).
- The Buildkite pipeline uploads steps using `pipeline.yml`.This is ideal if you want to containerize your builds or match production environments more closely.
## Try it yourself
To use this pattern in your own Go project:
1. Make sure Docker and Docker Compose are installed. See: [Install Docker Compose](https://docs.docker.com/compose/install/)
2. Copy the example config into your repo:```sh
cd /your/golang/repocurl -O https://raw.githubusercontent.com/buildkite/golang-docker-example/main/Dockerfile
curl -O https://raw.githubusercontent.com/buildkite/golang-docker-example/main/docker-compose.yml
```## License
See [LICENSE.md](LICENSE.md) (MIT)