forked from securego/gosec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Docker container and changing README
- Loading branch information
Amber Wiens
committed
Aug 3, 2017
1 parent
1beec25
commit 5f0f8f8
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 | ||
# | ||
|
||
FROM golang:1.8.1-alpine as builder | ||
ENV workspace /go/src/github.com/GoASTScanner/gas | ||
COPY . $workspace | ||
WORKDIR $workspace | ||
|
||
RUN go vet $(go list ./... | grep -v /vendor/) | ||
RUN CGO_ENABLED=0 go build -o gas . | ||
|
||
FROM alpine:3.6 | ||
|
||
LABEL MAINTAINER="David Graves <david.graves@hpe.com>" | ||
|
||
COPY --from=builder /go/src/github.com/GoASTScanner/gas/gas / | ||
|
||
# Mounted directory should be placed into the workdir | ||
CMD /gas $(find . -path ./vendor -prune -o -type f -name "*.go") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters