Forked from anis-campos/cross-compile_filebeat_arm.sh
Created
January 13, 2018 09:25
-
-
Save alibo/016c54c7e6dfcb8d4c87dae080230ad0 to your computer and use it in GitHub Desktop.
Cross-compile Elastic Filebeat for ARM with docker. Works Raspberry Pi 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#----- Create a Docker for cross-compilation -----# | |
mkdir build && cd $_ | |
docker run -it --rm -v `pwd`:/build golang:1.8.3 /bin/bash | |
#----- Inside docker -----# | |
go get github.com/elastic/beats | |
cd /go/src/github.com/elastic/beats/filebeat/ | |
git checkout v5.6.3 | |
GOARCH=arm go build | |
cp filebeat /build | |
exit | |
#----- Verify the outputfile -----# | |
file filebeat | |
#filebeat: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment