0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-01-27 09:09:05 +00:00
crazy-max_diun/hack/lint.Dockerfile
2021-08-13 18:27:59 +02:00

15 lines
504 B
Docker

# syntax=docker/dockerfile:1.2
ARG GO_VERSION
FROM golang:${GO_VERSION}-alpine AS base
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src
FROM golangci/golangci-lint:v1.37-alpine AS golangci-lint
FROM base AS lint
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/.cache/golangci-lint \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run --timeout 10m0s ./...