Build the Filebeat Docker Image for ppc64le architecture

Edmond Chan
1 min readFeb 25, 2021

--

I have a multi-architecture Kubernetes cluster across x86–64 and ppc64le platforms, and I need the Filebeat Docker image since I run the Elastic stack for log management. However, there is no official Docker image provided on ppc64le architecture, thus I have to build it myself.

Here is how to do it on a Red Hat Enterprise Linux 7.6 server running on ppc64le platform.

Install the necessary software packages.

yum install -y golang make git

Prepare the required environment.

mkdir go
export GOPATH=$(pwd)/go
mkdir -p ${GOPATH}/src/github.com/elastic
cd ${GOPATH}/src/github.com/elastic

Clone the Git repository of Elastic Beats.

git clone https://github.com/elastic/beats.git

Checkout the desired version.

cd $GOPATH/src/github.com/elastic/beats/filebeat
git checkout v7.11.1

Now it is good to go for compilation.

make

Prepare the Dockerfile.

cat <<EOF > Dockerfile
FROM centos:8
RUN yum -y update
ENV PATH="/usr/share/filebeat:${PATH}"
COPY ./filebeat-ppc64le /usr/share/filebeat
WORKDIR /usr/share/filebeat
ENTRYPOINT ["filebeat"]
EOF

Wrap the files for copying into the Docker image.

mkdir -p filebeat-ppc64le/data filebeat-ppc64le/logs
cp -p filebeat ./filebeat-ppc64le
cp -p filebeat.docker.yml ./filebeat-ppc64le/filebeat.yml
cp -p filebeat.reference.yml ./filebeat-ppc64le
cp -p README.md ./filebeat-ppc64le
cp -pR module ./filebeat-ppc64le
cp -pR modules.d ./filebeat-ppc64le

Build the Docker image.

docker build -t beats/filebeat-ppc64le:7.11.1 .

You should now have the Filebeat Docker image successfully built for ppc64le platform.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Edmond Chan
Edmond Chan

Written by Edmond Chan

Infrastructure Architect experienced in design and implementation of IT solutions for enterprises

No responses yet

Write a response