From 41f99b7f57e8172ee96dca7504bbb5025f013a16 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Wed, 15 Jun 2022 17:13:34 +0200 Subject: [PATCH] build: use cache to build go binary --- build-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index 504b66b..de83b21 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -27,7 +27,7 @@ image_build(){ printf "\n\nBuild go binary %s\n\n" "${BINARY}.${binary_suffix}" mkdir -p build - CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -mod vendor -a ${GOTAGS} -o "build/${BINARY}.${binary_suffix}" ./cmd/${BINARY}/ + CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build -mod vendor ${GOTAGS} -o "build/${BINARY}.${binary_suffix}" ./cmd/${BINARY}/ buildah --os "$GOOS" --arch "$GOARCH" $VARIANT --name "$containerName" from gcr.io/distroless/static buildah config --user 1234 "$containerName"