feat: add goctl docker build scripts (#1760)

This commit is contained in:
Kevin Wan
2022-04-05 13:07:05 +08:00
committed by GitHub
parent d5e550e79b
commit 8694e38384
2 changed files with 13 additions and 3 deletions

View File

@@ -10,3 +10,13 @@ win:
linux:
GOOS=linux go build -ldflags="-s -w" -o goctl-linux goctl.go
$(if $(shell command -v upx), upx goctl-linux)
image:
docker build --rm --platform linux/amd64 -t kevinwan/goctl:$(version) .
docker tag kevinwan/goctl:$(version) kevinwan/goctl:latest
docker push kevinwan/goctl:$(version)
docker push kevinwan/goctl:latest
docker build --rm --platform linux/arm64 -t kevinwan/goctl:$(version)-arm64 .
docker tag kevinwan/goctl:$(version)-arm64 kevinwan/goctl:latest-arm64
docker push kevinwan/goctl:$(version)-arm64
docker push kevinwan/goctl:latest-arm64