Skip to content

Commit

Permalink
Update promtail to 2.6.1 (#105)
Browse files Browse the repository at this point in the history
* Update promtail to 2.6.1

* Use go build instead of makefile

* Binary is in a new place now

* Back to makefile but golang 1.18.5

* Back to the original file location
  • Loading branch information
mdegat01 authored Aug 31, 2022
1 parent 02abbd0 commit 2ca2b64
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# https://hub.docker.com/_/golang
FROM golang:1.17.9-bullseye as build
FROM golang:1.18.5-bullseye as build
# https://github.com/grafana/loki/releases
ENV LOKI_VERSION 2.5.0
ENV LOKI_VERSION 2.6.1

WORKDIR /usr/src/loki

# Must build binary from source on system with journal support. Published binaries on release do not include this.
# https://packages.debian.org/buster/libsystemd-dev
Expand All @@ -10,20 +12,14 @@ RUN set -eux; \
apt-get install -qy --no-install-recommends \
libsystemd-dev=247.3-7 \
; \
curl -J -L -o /tmp/loki.tar.gz \
"https://github.com/grafana/loki/archive/refs/tags/v${LOKI_VERSION}.tar.gz"; \
mkdir -p /src; \
tar -xf /tmp/loki.tar.gz -C /src; \
mv "/src/loki-${LOKI_VERSION}" /src/loki; \
rm /tmp/loki.tar.gz;

WORKDIR /src/loki
RUN make BUILD_IN_CONTAINER=false promtail
git clone --depth 1 -b "v${LOKI_VERSION}" https://github.com/grafana/loki .; \
make clean; \
make BUILD_IN_CONTAINER=false promtail

# https://hub.docker.com/_/debian
FROM debian:bullseye-20220822-slim

COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
COPY --from=build /usr/src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
RUN promtail --version

# Build arguments
Expand Down

0 comments on commit 2ca2b64

Please sign in to comment.