mirror of
https://github.com/securego/gosec.git
synced 2024-11-05 19:45:51 +00:00
Use the Linux build for Docker image
This commit is contained in:
parent
dbd0f8f511
commit
e543f4662c
1 changed files with 6 additions and 1 deletions
7
Makefile
7
Makefile
|
@ -2,6 +2,8 @@ GIT_TAG?= $(shell git describe --always --tags)
|
|||
BIN = gosec
|
||||
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
|
||||
IMAGE_REPO = docker.io
|
||||
BUILDFLAGS := ''
|
||||
CGO_ENABLED = 0
|
||||
|
||||
default:
|
||||
$(MAKE) bootstrap
|
||||
|
@ -27,8 +29,11 @@ clean:
|
|||
release: bootstrap
|
||||
@echo "Releasing the gosec binary..."
|
||||
goreleaser release
|
||||
|
||||
build-linux:
|
||||
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags $(BUILDFLAGS) -o $(BIN) ./cmd/gosec/
|
||||
|
||||
image: build
|
||||
image: build-linux
|
||||
@echo "Building the Docker image..."
|
||||
docker build -t $(IMAGE_REPO)/$(BIN):$(GIT_TAG) .
|
||||
docker tag $(IMAGE_REPO)/$(BIN):$(GIT_TAG) $(IMAGE_REPO)/$(BIN):latest
|
||||
|
|
Loading…
Reference in a new issue