Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cmd/loki): embed LogCLI into Loki image #11146

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* [10733](https://github.com/grafana/loki/pull/10733) **shantanualsi** Add support for case-insensitive logql funtions
* [10727](https://github.com/grafana/loki/pull/10727) **sandeepsukhani** Native otlp ingestion support
* [11051](https://github.com/grafana/loki/pull/11051) Refactor to not use global logger in modules
* [11146](https://github.com/grafana/loki/pull/11146) **hainenber** Embed LogCLI binary into Loki's CLI for better DevExp.

##### Fixes
* [11074](https://github.com/grafana/loki/pull/11074) **hainenber** Fix panic in lambda-promtail due to mishandling of empty DROP_LABELS env var.

Expand Down
3 changes: 2 additions & 1 deletion cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ FROM golang:1.21.3 as build

COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki
RUN make clean && make BUILD_IN_CONTAINER=false loki logcli

FROM alpine:3.18.3

RUN apk add --no-cache ca-certificates libcap

COPY --from=build /src/loki/cmd/loki/loki /usr/bin/loki
COPY --from=build /src/loki/cmd/logcli/logcli /usr/bin/logcli
COPY cmd/loki/loki-docker-config.yaml /etc/loki/local-config.yaml

RUN addgroup -g 10001 -S loki && \
Expand Down
3 changes: 3 additions & 0 deletions docs/sources/query/logcli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ LogCLI is the command-line interface to Grafana Loki.
It facilitates running [LogQL]({{< relref "../query/_index.md" >}})
queries against a Loki instance.

LogCLI is also installed in Loki's Docker image for quick interaction
in containerized environment.

## Installation

### Binary (Recommended)
Expand Down
Loading