github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/clients/cmd/promtail/Dockerfile.arm32 (about) 1 FROM golang:1.18.4-bullseye as build 2 3 COPY . /src/loki 4 WORKDIR /src/loki 5 # Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression 6 RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list 7 RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev 8 RUN make clean && make BUILD_IN_CONTAINER=false promtail 9 10 # Promtail requires debian as the base image to support systemd journal reading 11 FROM debian:bullseye-slim 12 # tzdata required for the timestamp stage to work 13 # Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression 14 RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list 15 RUN apt-get update && \ 16 apt-get install -qy \ 17 tzdata ca-certificates 18 RUN apt-get install -t bullseye-backports -qy libsystemd-dev && \ 19 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 20 COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail 21 COPY clients/cmd/promtail/promtail-local-config.yaml /etc/promtail/local-config.yaml 22 COPY clients/cmd/promtail/promtail-docker-config.yaml /etc/promtail/config.yml 23 24 # Drone CI builds arm32 images using armv8l rather than armv7l. Something in 25 # our build process above causes ldconfig to be rerun and removes the armhf 26 # library that debian:stretch-slim on ARM comes with. Symbolically linking to 27 # ld-linux.so.3 fixes the problem and allows Promtail to start. 28 # 29 # This process isn't necessary when building on armv7l so we only do it if the 30 # library was removed. 31 RUN sh -c '[ ! -f /lib/ld-linux-armhf.so.3 ] && echo RE-LINKING LD-LINUX-ARMHF.SO.3 && ln -s /lib/ld-linux.so.3 /lib/ld-linux-armhf.so.3' 32 33 ENTRYPOINT ["/usr/bin/promtail"] 34 CMD ["-config.file=/etc/promtail/config.yml"]