trufflehog/hack/Dockerfile.protos
renovate[bot] fad3756aa9
chore(deps): update golang docker tag to v1.22 (#2420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-11 17:18:38 -08:00

24 lines
1 KiB
Docker

# trufflesecurity/protos:1.18-0
FROM golang:1.22-bullseye
ARG TARGETARCH
ARG TARGETOS
ENV PROTOC_VER=3.20.0
ENV GORELEASER_VER=v1.7.0
ENV SQLBOILER_VER=v4.9.0
ENV PROTOC_GEN_GO_VER=v1.5.2
RUN echo "building $TARGETARCH"
RUN apt-get update; apt-get install -y --no-install-recommends git unzip && rm -rf /var/lib/apt/lists/*
RUN set -e; \
arch=$(echo $TARGETARCH | sed -e s/amd64/x86_64/ -e s/arm64/aarch_64/); \
wget -q https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VER}/protoc-${PROTOC_VER}-${TARGETOS}-${arch}.zip && unzip protoc-${PROTOC_VER}-${TARGETOS}-${arch}.zip -d /usr/local
RUN go install "github.com/golang/protobuf/protoc-gen-go@${PROTOC_GEN_GO_VER}"
RUN GO111MODULE=off go get -d "github.com/envoyproxy/protoc-gen-validate" && \
cd $GOPATH/src/github.com/envoyproxy/protoc-gen-validate && \
git checkout v0.6.7 && \
ln -s /usr/local/protoc/include/google google && \
make build
RUN go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@latest
CMD ["bash"]