Skip to content

Commit

Permalink
Makefile: docker-build arg support
Browse files Browse the repository at this point in the history
  • Loading branch information
cyliu0 committed May 16, 2023
1 parent d8af83b commit d863416
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
#GO=GO15VENDOREXPERIMENT="1" CGO_ENABLED=0 GOARCH=$(GOARCH) GO111MODULE=on go
GO := GOOS=$(OS) GOARCH=$(ARCH) GO111MODULE=on go

PACKAGE_LIST := go list ./...| grep -vE "cmd"
Expand Down Expand Up @@ -40,7 +39,7 @@ mod:
@git diff --exit-code -- go.sum go.mod

docker-build: test
docker build . -t ${IMG}
docker build . -t ${IMG} --build-arg TARGETARCH=$(ARCH)

docker-push: docker-build
docker push ${IMG}

0 comments on commit d863416

Please sign in to comment.