We use Alpine Linux as the base for many of our Docker image deployments, like many others. If, like me, you are also using filebeat, and have been relying on the Alpine testing APK repository, you probably noticed it no longer contains filebeat because of this commit.
If you've done as I have, your filebeat installation in your Dockerfile probably looks like this today and isn't working:
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN apk update
RUN apk add filebeat
To make it work with the penultimate release (using 8.6.2, since 8.7.0 was JUST released a few days ago), you'd replace that with the following.
RUN apk update
RUN apk add curl libc6-compat
ENV FILEBEAT_VERSION=8.6.2
RUN curl https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${FILEBEAT_VERSION}-linux-x86_64.tar.gz \
-o /filebeat.tar.gz && \
tar xzvf filebeat.tar.gz && \
rm filebeat.tar.gz && \
mv filebeat-${FILEBEAT_VERSION}-linux-x86_64 filebeat && \
cd filebeat && \
cp filebeat /usr/bin
NOTE: If you leave out the libc6-compat, filebeat won't run. That took me a bit to track down
No comments:
Post a Comment