Skip to content

Commit

Permalink
Update libsystemd version in Docker containers (#258)
Browse files Browse the repository at this point in the history
* Use a newer libsystemd in Docker containers

Corresponds to grafana/loki#2957

* changelog

* merge apt-get commands to create less layers
  • Loading branch information
rfratto authored Jan 8, 2021
1 parent 2e5b06a commit 572c374
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
17 changes: 10 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ this platform. FreeBSD builds will return in a future release.

- [ENHANCEMENT] `process-exporter` has been updated to v0.7.5. (@rfratto)

- [BUGFIX] Integrations will now function if the HTTP listen address was set to
a value other than the default. ([#206](https://github.com/grafana/agent/issues/206)) (@mattdurham)

- [BUGFIX] The default Loki installation will now be able to write its positions
file. This was prevented by accidentally writing to a readonly volume mount.
(@rfratto)

- [ENHANCEMENT] `wal_cleanup_age` and `wal_cleanup_period` have been added to the
top-level Prometheus configuration section. These settings control how Write Ahead
Logs (WALs) that are not associated with any instances are cleaned up. By default,
WALs not associated with an instance that have not been written in the last 12 hours
are eligible to be cleaned up. This cleanup can be disabled by setting `wal_cleanup_period`
to `0`. (#304) (@56quarters)

- [ENHANCEMENT] Configuring logs to read from the systemd journal should now
work on journals that use +ZSTD compression. (@rfratto)

- [BUGFIX] Integrations will now function if the HTTP listen address was set to
a value other than the default. ([#206](https://github.com/grafana/agent/issues/206)) (@mattdurham)

- [BUGFIX] The default Loki installation will now be able to write its positions
file. This was prevented by accidentally writing to a readonly volume mount.
(@rfratto)

# v0.9.1 (2021-01-04)

NOTE: FreeBSD builds will not be included for this release. There is a bug in an
Expand Down
17 changes: 12 additions & 5 deletions cmd/agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
FROM golang:1.15 as build
FROM golang:1.15.3-buster as build
COPY . /src/agent
WORKDIR /src/agent
ARG RELEASE_BUILD=true
ARG IMAGE_TAG
RUN apt-get update && apt-get install -qy libsystemd-dev

# 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 buster-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t buster-backports -qy libsystemd-dev

RUN make clean && make IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN_CONTAINER=false agent

FROM debian:buster-slim
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates libsystemd-dev && \

# 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 buster-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t buster-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
COPY cmd/agent/agent-local-config.yaml /etc/agent/agent.yaml

Expand Down
9 changes: 6 additions & 3 deletions cmd/agent/Dockerfile.buildx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ RUN cp /go_wrapper.sh /seego.sh
RUN make clean && IMAGE_TAG=${IMAGE_TAG} RELEASE_BUILD=${RELEASE_BUILD} BUILD_IN_CONTAINER=false bash ./tools/cross_build.bash agent

FROM debian:buster-slim
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates libsystemd-dev && \

# 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 buster-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t buster-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=build /src/agent/cmd/agent/agent /bin/agent
COPY cmd/agent/agent-local-config.yaml /etc/agent/agent.yaml

Expand Down

0 comments on commit 572c374

Please sign in to comment.