0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-01-26 16:58:50 +00:00
crazy-max_diun/hack/lint.Dockerfile
CrazyMax 64cb538dbf
Go 1.18 (#592)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-09 07:57:35 +02:00

16 lines
510 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION="1.18"
ARG GOLANGCI_LINT_VERSION="v1.45"
FROM golang:${GO_VERSION}-alpine AS base
ENV GOFLAGS="-buildvcs=false"
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint
FROM base AS lint
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run ./...