mirror of
https://github.com/crazy-max/diun.git
synced 2026-01-02 11:07:28 +01:00
When the updated version of Nomad client comes out, I'm planning on a patch to upgrade so that communication over unix socket is available, however the latest requires go 1.21. Rather than bundle a go upgrade with the Nomad change, I thought it best to split up and make sure any potential issues or concerns with the go version are addressed first.
17 lines
514 B
Docker
17 lines
514 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG GO_VERSION="1.21"
|
|
ARG GOLANGCI_LINT_VERSION="v1.51"
|
|
|
|
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 ./...
|