mirror of
https://github.com/securego/gosec.git
synced 2024-11-06 03:55:50 +00:00
Updating Dockerfile with requested changes
This commit is contained in:
parent
5f0f8f89a6
commit
b120a3ec3f
1 changed files with 7 additions and 6 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,20 +1,21 @@
|
||||||
# Builds the Gas scanner with 'docker build' command, and runs Gas on all Go
|
|
||||||
# files in your current directory with 'docker run' command.
|
|
||||||
#
|
|
||||||
# Docker version must be 17.05 or higher to allow multistage build
|
# Docker version must be 17.05 or higher to allow multistage build
|
||||||
#
|
# See build and run instructions in README.md
|
||||||
|
|
||||||
|
# Builds Gas for utilization
|
||||||
FROM golang:1.8.1-alpine as builder
|
FROM golang:1.8.1-alpine as builder
|
||||||
ENV workspace /go/src/github.com/GoASTScanner/gas
|
ENV workspace /go/src/github.com/GoASTScanner/gas
|
||||||
|
ENV GOPATH /go
|
||||||
COPY . $workspace
|
COPY . $workspace
|
||||||
WORKDIR $workspace
|
WORKDIR $workspace
|
||||||
|
|
||||||
RUN go vet $(go list ./... | grep -v /vendor/)
|
RUN go vet $(go list ./... | grep -v /vendor/)
|
||||||
RUN CGO_ENABLED=0 go build -o gas .
|
RUN CGO_ENABLED=0 go build -o gas .
|
||||||
|
|
||||||
FROM alpine:3.6
|
########################################################
|
||||||
|
|
||||||
LABEL MAINTAINER="David Graves <david.graves@hpe.com>"
|
# Runs Gas on all Go files in the current directory when
|
||||||
|
# 'docker run' command in README is given
|
||||||
|
FROM alpine:3.6
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/GoASTScanner/gas/gas /
|
COPY --from=builder /go/src/github.com/GoASTScanner/gas/gas /
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue