Skip to content

Commit

Permalink
Add additional docker image for gometalinter.
Browse files Browse the repository at this point in the history
Currently the gometalinter does not work correctly with the alpine
docker image, as it scans too many directory.
See github issues:
 - kisielk/errcheck#119
 - alecthomas/gometalinter#149

As a solution, we add an additional layer with a debian image to the
multi-staged docker image. In this image, the gometalinter works
correctly.
  • Loading branch information
Fabian Schwarz-Fritz committed May 3, 2018
1 parent b7c52f8 commit 7269991
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
FROM golang:1.10.1 AS linter-env

# Install linters
RUN go get -u golang.org/x/lint/golint && \
go get github.com/GoASTScanner/gas/cmd/gas/... && \
go get github.com/alecthomas/gometalinter && \
gometalinter --install --update

# Directory in workspace
RUN mkdir -p "/go/src/github.com/Peripli/service-broker-proxy-k8s"
COPY . "/go/src/github.com/Peripli/service-broker-proxy-k8s"

RUN /go/bin/gometalinter --deadline=300s --disable=gotype /go/src/github.com/Peripli/service-broker-proxy-k8s

#########################################################
# Build the sources and provide the result in a multi stage
# docker container. The alpine build image has to match
Expand Down

0 comments on commit 7269991

Please sign in to comment.