From ba9cdf9d763e5c1c33ae2ec2dce229e2692f727b Mon Sep 17 00:00:00 2001 From: Paul Rogers <129207811+paul1r@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:00:37 -0500 Subject: [PATCH] chore(deps): Move from base-nossl to static (#15203) (cherry picked from commit 5f670a4b183dbf0066b5b941cac0330402f51e6e) --- cmd/logcli/Dockerfile | 2 +- cmd/logql-analyzer/Dockerfile | 2 +- cmd/loki-canary/Dockerfile | 2 +- cmd/loki-canary/Dockerfile.cross | 4 ++-- cmd/loki/Dockerfile | 2 +- cmd/loki/Dockerfile.cross | 4 ++-- cmd/migrate/Dockerfile | 7 ++++++- cmd/querytee/Dockerfile | 2 +- cmd/querytee/Dockerfile.cross | 2 +- production/helm/loki/src/helm-test/Dockerfile | 2 +- 10 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cmd/logcli/Dockerfile b/cmd/logcli/Dockerfile index 999434d075a8b..e5ce70c067df5 100644 --- a/cmd/logcli/Dockerfile +++ b/cmd/logcli/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false logcli -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/logcli/logcli /usr/bin/logcli SHELL [ "/busybox/sh", "-c" ] diff --git a/cmd/logql-analyzer/Dockerfile b/cmd/logql-analyzer/Dockerfile index 53ba7bee94b4e..7f3a3a10bd97b 100644 --- a/cmd/logql-analyzer/Dockerfile +++ b/cmd/logql-analyzer/Dockerfile @@ -5,7 +5,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && CGO_ENABLED=0 go build ./cmd/logql-analyzer/ -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/logql-analyzer /usr/bin/logql-analyzer SHELL [ "/busybox/sh", "-c" ] diff --git a/cmd/loki-canary/Dockerfile b/cmd/loki-canary/Dockerfile index f0dcf02d5d815..d3e716e0b5584 100644 --- a/cmd/loki-canary/Dockerfile +++ b/cmd/loki-canary/Dockerfile @@ -5,7 +5,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false loki-canary -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary SHELL [ "/busybox/sh", "-c" ] diff --git a/cmd/loki-canary/Dockerfile.cross b/cmd/loki-canary/Dockerfile.cross index 078cb62a37264..59c4bfeb87bd6 100644 --- a/cmd/loki-canary/Dockerfile.cross +++ b/cmd/loki-canary/Dockerfile.cross @@ -3,7 +3,7 @@ ARG GO_VERSION=1.22 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . -FROM golang:${GO_VERSION} as goenv +FROM golang:${GO_VERSION} AS goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm @@ -13,7 +13,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-canary -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary SHELL [ "/busybox/sh", "-c" ] RUN ln -s /busybox/sh /bin/sh diff --git a/cmd/loki/Dockerfile b/cmd/loki/Dockerfile index 521c591595736..03c4168d74a91 100644 --- a/cmd/loki/Dockerfile +++ b/cmd/loki/Dockerfile @@ -5,7 +5,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false loki -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/loki/loki /usr/bin/loki COPY cmd/loki/loki-docker-config.yaml /etc/loki/local-config.yaml diff --git a/cmd/loki/Dockerfile.cross b/cmd/loki/Dockerfile.cross index da9d358d28c5f..d3fa8a309a714 100644 --- a/cmd/loki/Dockerfile.cross +++ b/cmd/loki/Dockerfile.cross @@ -2,7 +2,7 @@ ARG GO_VERSION=1.22 # Directories in this file are referenced from the root of the project not this folder # This file is intended to be called from the root like so: # docker build -t grafana/loki -f cmd/loki/Dockerfile . -FROM golang:${GO_VERSION} as goenv +FROM golang:${GO_VERSION} AS goenv RUN go env GOARCH > /goarch && \ go env GOARM > /goarm @@ -10,7 +10,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=goenv /src/loki/cmd/loki/loki /usr/bin/loki COPY cmd/loki/loki-local-config.yaml /etc/loki/local-config.yaml diff --git a/cmd/migrate/Dockerfile b/cmd/migrate/Dockerfile index a24697a719f2b..f5b0f15cc8469 100644 --- a/cmd/migrate/Dockerfile +++ b/cmd/migrate/Dockerfile @@ -1,10 +1,15 @@ +<<<<<<< HEAD ARG GO_VERSION=1.22 FROM golang:${GO_VERSION} as build +======= +ARG GO_VERSION=1.23 +FROM golang:${GO_VERSION} AS build +>>>>>>> 5f670a4b1 (chore(deps): Move from base-nossl to static (#15203)) COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false migrate -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/migrate/migrate /usr/bin/migrate SHELL [ "/busybox/sh", "-c" ] diff --git a/cmd/querytee/Dockerfile b/cmd/querytee/Dockerfile index ea86fe0249ee0..247558037cf79 100644 --- a/cmd/querytee/Dockerfile +++ b/cmd/querytee/Dockerfile @@ -5,7 +5,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false loki-querytee -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee SHELL [ "/busybox/sh", "-c" ] diff --git a/cmd/querytee/Dockerfile.cross b/cmd/querytee/Dockerfile.cross index 478f69a67e3b1..1f1faee3875d0 100644 --- a/cmd/querytee/Dockerfile.cross +++ b/cmd/querytee/Dockerfile.cross @@ -13,7 +13,7 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-querytee -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee SHELL [ "/busybox/sh", "-c" ] RUN ln -s /busybox/sh /bin/sh diff --git a/production/helm/loki/src/helm-test/Dockerfile b/production/helm/loki/src/helm-test/Dockerfile index bb71f28b98edc..e2a4da4d80184 100644 --- a/production/helm/loki/src/helm-test/Dockerfile +++ b/production/helm/loki/src/helm-test/Dockerfile @@ -8,6 +8,6 @@ COPY . /src/loki WORKDIR /src/loki RUN make clean && make BUILD_IN_CONTAINER=false helm-test -FROM gcr.io/distroless/base-nossl:debug +FROM gcr.io/distroless/static:debug COPY --from=build /src/loki/production/helm/loki/src/helm-test/helm-test /usr/bin/helm-test ENTRYPOINT [ "/usr/bin/helm-test" ]