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
See the full Getting Started Guide for step-by-step instructions on how to get this running, or try it yourself:
This example uses a Docker-based workflow to run Go tests:
- The pipeline runs
go testandgo vetinside a container. - The container is defined using
Dockerfileanddocker-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.ymlSee LICENSE.md (MIT)