File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.11.5-alpine3.9 as build
2
- WORKDIR /go/src/github.com/securego/gosec
3
- COPY . .
4
- RUN apk add -U git make
5
- RUN go get -u github.com/golang/dep/cmd/dep
6
- RUN make
1
+ ARG GO_VERSION=1.12
2
+ FROM golang:${GO_VERSION}-alpine AS builder
3
+ RUN apk add --update --no-cache ca-certificates make git curl
4
+ RUN mkdir -p /build
5
+ WORKDIR /build
6
+ COPY . /build/
7
+ RUN go mod download
8
+ RUN make build-linux
7
9
8
- FROM golang:1.11.5-alpine3.9
9
- RUN apk add -U gcc musl-dev
10
- COPY --from=build /go/src/github.com/securego/gosec/gosec /usr/local/bin/gosec
11
- ENTRYPOINT ["gosec" ]
10
+ FROM golang:${GO_VERSION}-alpine
11
+ RUN apk add --update --no-cache ca-certificates git
12
+ ENV GO111MODULE on
13
+ COPY --from=builder /build/gosec /bin/gosec
14
+ ENTRYPOINT ["/bin/gosec" ]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ GIT_TAG?= $(shell git describe --always --tags)
2
2
BIN = gosec
3
3
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*' ) | tee /dev/stderr )
4
4
IMAGE_REPO = securego
5
- BUILDFLAGS := ''
5
+ BUILDFLAGS := '-w -s '
6
6
CGO_ENABLED = 0
7
7
8
8
default :
You can’t perform that action at this time.
0 commit comments