From 1411ea9ef99c41aba612b29d356c5dccd779f628 Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Sat, 4 Nov 2023 08:56:52 +0000 Subject: [PATCH] renovate: let renovate update gops in Dockerfile Signed-off-by: Mahe Tardy --- .github/renovate.json5 | 9 +++++++++ Dockerfile | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 5ed93146348..89e89312806 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -395,6 +395,15 @@ "matchStrings": [ "// renovate: datasource=(?.*?) depName=(?.*?)\\s+go (?.*)" ] + }, + { + "customType": "regex", + "fileMatch": [ + "^Dockerfile$" + ], + "matchStrings": [ + "# renovate: datasource=(?.*?) depName=(?.*?)\\s+&& git clone --depth 1 --branch (?v\\d+\\.\\d+\\.\\d+)" + ] } ] } diff --git a/Dockerfile b/Dockerfile index 6f421c9eaed..8abe4a0bde3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,10 +35,10 @@ RUN if [ $BUILDARCH != $TARGETARCH ]; \ # Third builder (cross-)compile a stripped gops FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.21.3-alpine@sha256:926f7f7e1ab8509b4e91d5ec6d5916ebb45155b0c8920291ba9f361d65385806 as gops ARG TARGETARCH -RUN apk add --no-cache binutils git \ - && git clone https://github.com/google/gops /go/src/github.com/google/gops \ - && cd /go/src/github.com/google/gops \ - && git checkout -b v0.3.22 v0.3.22 \ +RUN apk add --no-cache git \ +# renovate: datasource=github-releases depName=google/gops + && git clone --depth 1 --branch v0.3.22 https://github.com/google/gops /gops \ + && cd /gops \ && GOARCH=$TARGETARCH go build -ldflags="-s -w" . # This builder (cross-)compile a stripped static version of bpftool. @@ -84,7 +84,7 @@ RUN mkdir /var/lib/tetragon/ && \ apk add --no-cache --update bash COPY --from=tetragon-builder /go/src/github.com/cilium/tetragon/tetragon /usr/bin/ COPY --from=tetragon-builder /go/src/github.com/cilium/tetragon/tetra /usr/bin/ -COPY --from=gops /go/src/github.com/google/gops/gops /usr/bin/ +COPY --from=gops /gops/gops /usr/bin/ COPY --from=bpf-builder /go/src/github.com/cilium/tetragon/bpf/objs/*.o /var/lib/tetragon/ ENTRYPOINT ["/usr/bin/tetragon"]