Skip to content

Commit

Permalink
fix: switch promtails base image from debian to ubuntu (backport rele…
Browse files Browse the repository at this point in the history
…ase-2.9.x) (#15210)
  • Loading branch information
cstyan authored and trevorwhitney committed Dec 4, 2024
1 parent 2188a35 commit ae1fb5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
15 changes: 6 additions & 9 deletions clients/cmd/promtail/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:bullseye-slim
# Promtail requires debian or ubuntu as the base image to support systemd journal reading
FROM public.ecr.aws/ubuntu/ubuntu:noble
# tzdata required for the timestamp stage to work
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates
RUN apt-get install -t bullseye-backports -qy libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install dependencies needed at runtime.
RUN apt-get update \
&& apt-get install -qy libsystemd-dev tzdata ca-certificates \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
COPY clients/cmd/promtail/promtail-docker-config.yaml /etc/promtail/config.yml
ENTRYPOINT ["/usr/bin/promtail"]
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/promtail/Dockerfile.arm32
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:bullseye-slim
# Promtail requires debian or ubuntu as the base image to support systemd journal reading
FROM public.ecr.aws/ubuntu/ubuntu:noble
# tzdata required for the timestamp stage to work
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:stretch-slim
# Promtail requires debian or ubuntu as the base image to support systemd journal reading
FROM public.ecr.aws/ubuntu/ubuntu:noble
# tzdata required for the timestamp stage to work
RUN apt-get update && \
apt-get install -qy \
Expand Down

0 comments on commit ae1fb5a

Please sign in to comment.