mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
37 lines
1.2 KiB
Docker
37 lines
1.2 KiB
Docker
ARG GOLANG_VERSION
|
|
|
|
FROM golang:${GOLANG_VERSION}-stretch
|
|
|
|
LABEL authors="Julien Neuhart <j.neuhart@thecodingmachine.com>"
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | GolangCI-Lint
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Installs GolangCI-Lint, a linters Runner for Go. 5x faster
|
|
# | than gometalinter.
|
|
# |
|
|
|
|
ENV GOLANGCI_LINT_VERSION 1.12.3
|
|
|
|
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b /usr/local/bin v${GOLANGCI_LINT_VERSION} &&\
|
|
golangci-lint --version
|
|
|
|
# |--------------------------------------------------------------------------
|
|
# | Final touch
|
|
# |--------------------------------------------------------------------------
|
|
# |
|
|
# | Last instructions of this build.
|
|
# |
|
|
|
|
# Define our workding outside of $GOPATH (we're using go modules).
|
|
WORKDIR /lint
|
|
|
|
# Copy our module dependencies definitions.
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
# Install module dependencies.
|
|
RUN go mod download
|
|
|
|
CMD ["golangci-lint", "run" ,"--tests=false", "--enable-all", "--disable=dupl", "--disable=lll", "--disable=errcheck", "--disable=gosec", "--disable=gochecknoglobals", "--disable=gochecknoinits" ] |