Dockerfile for build centos linux binary with gcc, go
Go to file
Lunny Xiao 4efcfcd7d9
Some checks failed
Build image / build-image (push) Failing after 24s
Use actions instead of drone (#1)
Reviewed-on: #1
2023-04-23 14:51:44 +08:00
.gitea/workflows Use actions instead of drone (#1) 2023-04-23 14:51:44 +08:00
Dockerfile Add make 2022-08-09 17:00:19 +08:00
README.md Add more hints 2022-08-09 16:55:09 +08:00

Usage

This assumes that you are using go mod to build.

docker run --rm -v "$PWD":/myrepo -w /myrepo lunny/centos-go:latest go build

With a goproxy env

docker run --rm -v "$PWD":/myrepo -w /myrepo -e GOPROXY=goproxy.io lunny/centos-go:latest go build

With a shared go mod cache in host

docker run --rm -v "$PWD":/myrepo -v ~/go/pkg/mod:/modcache -w /myrepo -e GOMODCACHE=/modcache -e GOPROXY=goproxy.io lunny/centos-go:latest go build