diff --git a/cmd/logcli/Dockerfile b/cmd/logcli/Dockerfile index 52a66fea9a0cd..ddccaff2a7813 100644 --- a/cmd/logcli/Dockerfile +++ b/cmd/logcli/Dockerfile @@ -1,12 +1,12 @@ ARG GO_VERSION=1.23 -FROM golang:${GO_VERSION} as build +FROM golang:${GO_VERSION} AS build COPY . /src/loki 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 6cfb7ad795e4c..838aa9027778b 100644 --- a/cmd/logql-analyzer/Dockerfile +++ b/cmd/logql-analyzer/Dockerfile @@ -1,11 +1,11 @@ ARG GO_VERSION=1.23 -FROM golang:${GO_VERSION} as build +FROM golang:${GO_VERSION} AS build 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 2833d60590ca0..bfb97ba22bb80 100644 --- a/cmd/loki-canary/Dockerfile +++ b/cmd/loki-canary/Dockerfile @@ -1,11 +1,11 @@ ARG GO_VERSION=1.23 -FROM golang:${GO_VERSION} as build +FROM golang:${GO_VERSION} AS build 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 deaafce0ddbad..9471ea46924fd 100644 --- a/cmd/loki-canary/Dockerfile.cross +++ b/cmd/loki-canary/Dockerfile.cross @@ -3,7 +3,7 @@ ARG GO_VERSION=1.23 # 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 521a897d645dc..4e7ea13081695 100644 --- a/cmd/loki/Dockerfile +++ b/cmd/loki/Dockerfile @@ -1,11 +1,11 @@ ARG GO_VERSION=1.23 -FROM golang:${GO_VERSION} as build +FROM golang:${GO_VERSION} AS build 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 97fba445ef2f6..9562c6539ab18 100644 --- a/cmd/loki/Dockerfile.cross +++ b/cmd/loki/Dockerfile.cross @@ -2,7 +2,7 @@ ARG GO_VERSION=1.23 # 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 82a78a4782d17..120602d9c4d66 100644 --- a/cmd/migrate/Dockerfile +++ b/cmd/migrate/Dockerfile @@ -1,10 +1,10 @@ ARG GO_VERSION=1.23 -FROM golang:${GO_VERSION} as build +FROM golang:${GO_VERSION} AS build 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 f2403d8df0e73..9fc23f8ce316b 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 83795cd3dc285..f514ba84941a8 100644 --- a/cmd/querytee/Dockerfile.cross +++ b/cmd/querytee/Dockerfile.cross @@ -3,7 +3,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.34.0 # This file is intended to be called from the root like so: # docker build -t grafana/promtail -f cmd/promtail/Dockerfile . ARG GO_VERSION=1.23 -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-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 9645b206b1057..9378d53aa8ba5 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" ]