# syntax=docker/dockerfile:1 ARG GO_VERSION=1.21.6 ARG BASE_DEBIAN_DISTRO="bookworm" ARG PROTOC_VERSION=3.11.4 # protoc is dynamically linked to glibc so can't use alpine base FROM golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO} AS base RUN apt-get update && apt-get --no-install-recommends install -y git unzip ARG PROTOC_VERSION ARG TARGETOS ARG TARGETARCH ENV GOTOOLCHAIN=local RUN <&2 'ERROR: The result of "go generate" differs. Please update with "make generate-files"' echo "$diff" exit 1 fi EOT