Tooling for linting, testing and building Go applications
- Project home
- Docker images
- Overview
- Linting tools included
- Build tools included
- Testing tools included
- Images
- Matrix images
- General build images
go-ci-oldstable-alpine-buildx86
go-ci-oldstable-alpine-buildx64
go-ci-stable-alpine-buildx86
go-ci-stable-alpine-buildx64
go-ci-unstable-alpine-buildx86
go-ci-unstable-alpine-buildx64
go-ci-oldstable-cgo-mingw-w64-buildx86
go-ci-oldstable-cgo-mingw-w64-buildx64
go-ci-stable-cgo-mingw-w64-buildx86
go-ci-stable-cgo-mingw-w64-buildx64
go-ci-unstable-cgo-mingw-w64-buildx86
go-ci-unstable-cgo-mingw-w64-buildx64
- Mirror build images
- Release build images
- Examples / How to use these images
- Changelog
- Requirements
- References
See our GitHub repo for the latest content, to file an issue or submit improvements for review and potential inclusion into the project.
See these container image registries for the full listing of available images:
A mix of GitHub Actions / CI focused Docker container images primarily intended to simplify linting/testing/building other Go projects that I maintain. I am developing the content in the open in case it is useful to others.
Unless indicated otherwise, the following linting tools are included in the
go-ci-stable
, go-ci-oldstable
and go-ci-unstable
images:
Linter | Version |
---|---|
staticcheck |
2024.1.1 (v0.5.1 ) |
golangci-lint |
v1.62.0 |
govulncheck |
v1.1.3 |
deadcode |
v0.27.0 |
pelletier/go-toml |
v2.2.3 |
fatih/errwrap |
v1.6.0 |
Forks:
Linter | Version |
---|---|
orijtech/httperroryzer |
9f94717820d4a5075117680de2ca07875d32c9f1 |
orijtech/structslop |
33c868804e9e6070fdaee64b729d3129bbe85a53 |
orijtech/tickeryzer |
b38acaa6d76d30629a49ad9eddd1aa5ddd0afa8f |
The following build tools are included in all *-build*
images except for
the *-mirror-*
images:
Build tool | Version |
---|---|
tc-hib/go-winres |
v0.3.3 |
goreleaser/nfpm |
v2.41.0 |
choffmeister/git-describe-semver |
v0.4.0 |
The following testing tools are included in the go-ci-stable
,
go-ci-oldstable
and go-ci-unstable
images:
Testing tool | Version |
---|---|
bitfield/gotestdox |
v0.2.2 |
- built from the latest version of the current stable
golang
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - intended for use in a build/test matrix of prior, current and upcoming Go releases
- ✔️ provides multiple linters
- ✔️ provides testing tools
- ❌ does not include custom build tools
- built from the latest version of the current outgoing stable
golang
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - intended for use in a build/test matrix of prior, current and upcoming Go releases
- ✔️ provides multiple linters
- ✔️ provides testing tools
- ❌ does not include custom build tools
- built from the latest available non-stable
golang:beta
image,golang:rc
image or if not recently available, the latest stablegolang
image- intended to test whether new Go versions break existing code or surface problems in existing code that current Go releases do not
- used for building and testing Go applications, both directly and via
Makefile
builds - intended for use in a build/test matrix of prior, current and upcoming Go releases
- ✔️ provides multiple linters
- ✔️ provides testing tools
- ❌ does not include custom build tools
- used to test new or additional
golangci-lint
linters prior to inclusion in thestable
andoldstable
container image variants- new linters as a whole may be added to multiple image variants, not just this image unless it is suspected that the new linters are highly experimental/unstable
- based on the latest version of the current outgoing stable
i386/golang
alpine
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - uses musl libc instead of glibc
- supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-oldstable-alpine-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- based on the latest version of the current stable
i386/golang
alpine
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - uses musl libc instead of glibc
- supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-stable-alpine-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest available non-stable (beta, rc or if not available the
latest stable) version of the
i386/golang
alpine
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - uses musl libc instead of glibc
- supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-unstable-alpine-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest version of the current outgoing stable
i386/golang
image - used for building and testing Go applications, both directly and via
Makefile
builds. - supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides Fyne toolkit build dependencies
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-oldstable-cgo-mingw-w64-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ✔️ provides Fyne toolkit build dependencies
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest version of the current stable
i386/golang
image - used for building and testing Go applications, both directly and via
Makefile
builds. - supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides multiple custom build tools
- ✔️ provides Fyne toolkit build dependencies
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-stable-cgo-mingw-w64-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ✔️ provides Fyne toolkit build dependencies
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest available non-stable (beta, rc or if not available the
latest stable)
golang
image. - used for building and testing Go applications, both directly and via
Makefile
builds. - supports cross-platform, cgo-enabled builds for Windows and Linux
- Windows 32-bit:
i686-w64-mingw32-gcc
- Windows 64-bit:
x86_64-w64-mingw32-gcc
- Windows 32-bit:
- ✔️ provides multiple custom build tools
- ✔️ provides Fyne toolkit build dependencies
- ❌ does not include linters
- ❌ does not include testing tools
- same as
go-ci-unstable-cgo-mingw-w64-buildx86
, but specific to x64 architecture - ✔️ provides multiple custom build tools
- ✔️ provides Fyne toolkit build dependencies
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest version of the
golang
image for that series- e.g., the
go-ci-mirror-build-go1.14
image is built from the final release version in the 1.14 series (1.14.15)
- e.g., the
- intended to mirror the upstream
golang
image for Makefile-driven testing, linting and build tasks. - few (if any) customizations are intended for this image, instead relying on a project's Makefile or other build tool to setup the environment for tasks such as testing, linting & building source code
- ❌ does not include linters
- ❌ does not include testing tools
- ❌ does not include custom build tools
These images are intended to assist with asserting that projects build with the latest version in a specific series.
Unlike most other images, the go-ci-oldstable-mirror-build
name is not the
title of an image (such as go-ci-stable
), but rather an additional tag for
the latest version of the golang
image for the oldstable
series.
- built from the latest version of the
golang
image for theoldstable
series- e.g., if the latest
oldstable
version of the Go toolchain is 1.19.6 and 1.20.1 is the latest in thestable
series, thego-ci-oldstable-mirror-build
image will refer to the 1.19.6 image
- e.g., if the latest
- intended to mirror the latest
oldstable
(outgoing) upstreamgolang
image for Makefile-driven testing, linting and build tasks. - few (if any) customizations are intended for this image, instead relying on a project's Makefile or other build tool to setup the environment for tasks such as testing, linting & building source code
- ❌ does not include linters
- ❌ does not include testing tools
- ❌ does not include custom build tools
These images are intended to assist with asserting that projects build with
the latest version in the outgoing stable (aka, oldstable
) series.
Unlike most other images, the go-ci-stable-mirror-build
name is not the
title of an image (such as go-ci-stable
), but rather an additional tag for
the latest version of the golang
image for the stable
series.
- built from the latest version of the
golang
image for the currentstable
series- e.g., if the latest
oldstable
version of the Go toolchain is 1.19.6 and 1.20.1 is the latest in thestable
series, thego-ci-stable-mirror-build
image tag will refer to the 1.20.1 image
- e.g., if the latest
- intended to mirror the latest
stable
(current) upstreamgolang
image for Makefile-driven testing, linting and build tasks. - few (if any) customizations are intended for this image, instead relying on a project's Makefile or other build tool to setup the environment for tasks such as testing, linting & building source code
- ❌ does not include linters
- ❌ does not include testing tools
- ❌ does not include custom build tools
These images are intended to assist with asserting that projects build with the latest version in the current stable series.
- built from the latest version of the current stable
golang
image. - used for building dev and stable releases of Go code
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest version of the current outgoing stable
golang
image. - used for building dev and stable releases of Go code
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
- built from the latest available non-stable
golang:beta
image,golang:rc
image or if not recently available, the latest stablegolang
image- intended to test whether new Go versions break existing code or surface problems in existing code that current Go releases do not
- used for building dev and stable releases of Go code
- ✔️ provides multiple custom build tools
- ❌ does not include linters
- ❌ does not include testing tools
For real-world examples of how these images are used, please see the workflows for these projects:
- https://github.com/atc0005/shared-project-resources/tree/master/.github/workflows
- https://github.com/atc0005/check-cert/blob/master/.github/workflows
- https://github.com/atc0005/check-vmware/blob/master/.github/workflows
- https://github.com/atc0005/check-mail/blob/master/.github/workflows
- https://github.com/atc0005/dnsc/tree/master/.github/workflows
- https://github.com/atc0005/mysql2sqlite/tree/master/.github/workflows
See the CHANGELOG.md
file for the changes associated with
each release of this project.
- Docker
- for building images
make
- if using the provided
Makefile
- if using the provided
- Sufficient disk space to hold build images
- 20+ GB free disk space recommended if building all images
- 10+ GB free disk space recommended if building one set of images
- Linting
- Build Tools
- Testing Tools
- Images