Skip to content

Commit

Permalink
chore(deps): Move from base-nossl to static (#15203)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5f670a4)
  • Loading branch information
paul1r authored and grafana-delivery-bot[bot] committed Dec 2, 2024
1 parent b2fdb79 commit 79a25d2
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions cmd/logcli/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
4 changes: 2 additions & 2 deletions cmd/logql-analyzer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki-canary/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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

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
Expand Down
4 changes: 2 additions & 2 deletions cmd/migrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
Expand Down
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
4 changes: 2 additions & 2 deletions cmd/querytee/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/src/helm-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit 79a25d2

Please sign in to comment.