go-toolbox/README.md

46 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2024-05-04 13:18:37 +05:00
# Go ToolBox
Docker image with everything you might need for developing apps in Go.
## What's inside
Debian 12 (slim) is used as base image.
| Binary | Version | Project | Repo |
| ----------------- | ------- | --------------- | ------------------------------------------------------------- |
2024-09-21 23:59:52 +05:00
| `go` | 1.23.1 | Go | |
| `golangci-lint` | 1.61.0 | golangci-lint | [External link](https://github.com/golangci/golangci-lint) |
| `gofumpt` | 0.7.0 | gofumpt | [External link](https://github.com/mvdan/gofumpt) |
| `mockery_v2` | 2.46.0 | mockery | [External link](https://github.com/vektra/mockery) |
| `task` | 3.39.2 | taskfile | [External link](https://github.com/go-task/task) |
2024-05-04 13:18:37 +05:00
| `go-junit-report` | 2.1.0 | go-junit-report | [External link](https://github.com/jstemmer/go-junit-report) |
2024-09-21 23:59:52 +05:00
| `delve` | 1.23.0 | delve | [External link](https://github.com/go-delve/delve) |
2024-05-04 13:18:37 +05:00
2024-07-07 21:17:15 +05:00
## Multiarch support
This image contains versions for both amd64 (AMD/Intel CPUs and their clones) and arm64 (Rockchips, Apple Silicon and so on).
Note, that **amd64** image built on my CI server, while **arm64** image I building on my local machine with `built_multiarch.sh`
for each published tag. It is because I have no separate arm64 machine (yet) and it's emulation on my server's CPU is freaking
slow (imagine Linux installation is going for three whole hours!).
2024-05-04 13:18:37 +05:00
## HOME
Home directory is `/home/container`.
## Caching
Go's build cache resides in `/home/container/.cache`, `GOCACHE` environment variable is defined. You can mount it when needed in Dockerfile as:
```Dockerfile
RUN --mount=type=cache,target="$GOCACHE" go build
```
## Utilities examples
### JUnit report generation (for Gitlab)
```shell
go test -v 2>&1 ./... | go-junit-report -set-exit-code > unit-report.xml
```