mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +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
|
BIN = gosec
|
||||||
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
|
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
|
||||||
IMAGE_REPO = docker.io
|
IMAGE_REPO = docker.io
|
||||||
|
BUILDFLAGS := ''
|
||||||
|
CGO_ENABLED = 0
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$(MAKE) bootstrap
|
$(MAKE) bootstrap
|
||||||
|
@ -28,7 +30,10 @@ release: bootstrap
|
||||||
@echo "Releasing the gosec binary..."
|
@echo "Releasing the gosec binary..."
|
||||||
goreleaser release
|
goreleaser release
|
||||||
|
|
||||||
image: build
|
build-linux:
|
||||||
|
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags $(BUILDFLAGS) -o $(BIN) ./cmd/gosec/
|
||||||
|
|
||||||
|
image: build-linux
|
||||||
@echo "Building the Docker image..."
|
@echo "Building the Docker image..."
|
||||||
docker build -t $(IMAGE_REPO)/$(BIN):$(GIT_TAG) .
|
docker build -t $(IMAGE_REPO)/$(BIN):$(GIT_TAG) .
|
||||||
docker tag $(IMAGE_REPO)/$(BIN):$(GIT_TAG) $(IMAGE_REPO)/$(BIN):latest
|
docker tag $(IMAGE_REPO)/$(BIN):$(GIT_TAG) $(IMAGE_REPO)/$(BIN):latest
|
||||||
|
|
Loading…
Reference in a new issue