This repository is an example Buildkite pipeline that runs tests for a Golang project inside Docker.
👉 See this example in action: buildkite/golang-docker-example

This example uses a Docker-based workflow to run Go tests:
- The pipeline runs
go test
andgo vet
inside a container. - The container is defined using
Dockerfile
anddocker-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.
To use this pattern in your own Go project:
- Make sure Docker and Docker Compose are installed. See: Install Docker Compose
- Copy the example config into your repo:
cd /your/golang/repo
curl -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
See LICENSE.md (MIT)