klaus@docker:~$ docker run --init --rm -it -v `pwd`:/pcap --link kibana --link elasticsearch blacktop/filebeat -e
Unable to find image 'blacktop/filebeat:latest' locally
latest: Pulling from blacktop/filebeat
9d48c3bd43c5: Already exists
fc3cebc17991: Pull complete
5cc76213ba9d: Pull complete
3e7376168fbf: Pull complete
b861f6c07f10: Pull complete
3946a80b0229: Pull complete
Digest: sha256:437128d2d77fe4eea77c10852a6eac569ec9931662a7bb3ce49a131fe39a6683
Status: Downloaded newer image for blacktop/filebeat:latest
===> Waiting on elasticsearch(elasticsearch:9200) to start...
Elasticsearch is ready!
===> Waiting for Kibana(kibana:5601) to start...Kibana is ready!
===> Setting up filebeat...
2019-10-16T08:38:28.342Z INFO instance/beat.go:606 Home path: [/usr/share/filebeat] Config path: [/usr/share/filebeat] Data path: [/usr/share/filebeat/data] Logs path: [/usr/share/filebeat/logs]
2019-10-16T08:38:28.351Z INFO instance/beat.go:614 Beat ID: d492666b-2800-425b-a92c-16a3f383e5f7
2019-10-16T08:38:28.352Z INFO [beat] instance/beat.go:902 Beat info {"system_info": {"beat": {"path": {"config": "/usr/share/filebeat", "data": "/usr/share/filebeat/data", "home": "/usr/share/filebeat", "logs": "/usr/share/filebeat/logs"}, "type": "filebeat", "uuid": "d492666b-2800-425b-a92c-16a3f383e5f7"}}}
2019-10-16T08:38:28.352Z INFO [beat] instance/beat.go:911 Build info {"system_info": {"build": {"commit": "a4be71b90ce3e3b8213b616adfcd9e455513da45", "libbeat": "7.3.1", "time": "2019-08-19T19:30:50.000Z", "version": "7.3.1"}}}
2019-10-16T08:38:28.352Z INFO [beat] instance/beat.go:914 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":2,"version":"go1.12.4"}}}
2019-10-16T08:38:28.354Z INFO [beat] instance/beat.go:918 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-10-13T17:33:29Z","containerized":true,"name":"c86de9f6e08a","ip":["127.0.0.1/8","172.17.0.9/16"],"kernel_version":"4.19.0-6-amd64","mac":["02:42:ac:11:00:09"],"os":{"family":"","platform":"alpine","name":"Alpine Linux","version":"","major":0,"minor":0,"patch":0},"timezone":"UTC","timezone_offset_sec":0}}}
2019-10-16T08:38:28.356Z INFO [beat] instance/beat.go:947 Process info {"system_info": {"process": {"capabilities": {"inheritable":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"permitted":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"effective":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"bounding":["chown","dac_override","fowner","fsetid","kill","setgid","setuid","setpcap","net_bind_service","net_raw","sys_chroot","mknod","audit_write","setfcap"],"ambient":null}, "cwd": "/usr/share/filebeat", "exe": "/usr/share/filebeat/filebeat", "name": "filebeat", "pid": 12, "ppid": 6, "seccomp": {"mode":"filter","no_new_privs":false}, "start_time": "2019-10-16T08:38:27.760Z"}}}
2019-10-16T08:38:28.357Z INFO instance/beat.go:292 Setup Beat: filebeat; Version: 7.3.1
2019-10-16T08:38:28.357Z INFO [index-management] idxmgmt/std.go:178 Set output.elasticsearch.index to 'filebeat-7.3.1' as ILM is enabled.
2019-10-16T08:38:28.358Z INFO elasticsearch/client.go:170 Elasticsearch url: http://elasticsearch:9200
2019-10-16T08:38:28.359Z INFO [publisher] pipeline/module.go:97 Beat name: c86de9f6e08a
2019-10-16T08:38:28.366Z INFO beater/filebeat.go:92 Enabled modules/filesets: zeek (dns, files, http, notice, ssl, connection)
2019-10-16T08:38:28.380Z INFO elasticsearch/client.go:170 Elasticsearch url: http://elasticsearch:9200
2019-10-16T08:38:28.632Z INFO elasticsearch/client.go:743 Attempting to connect to Elasticsearch version 7.0.1
2019-10-16T08:38:28.639Z ERROR elasticsearch/elasticsearch.go:260 Error connecting to Elasticsearch at http://elasticsearch:9200: Connection marked as failed because the onConnect callback failed: This Beat requires the default distribution of Elasticsearch. Please install the default distribution of Elasticsearch from elastic.co, or install the oss-only distribution of beats
2019-10-16T08:38:28.639Z ERROR instance/beat.go:877 Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://elasticsearch:9200: Connection marked as failed because the onConnect callback failed: This Beat requires the default distribution of Elasticsearch. Please install the default distribution of Elasticsearch from elastic.co, or install the oss-only distribution of beats]
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://elasticsearch:9200: Connection marked as failed because the onConnect callback failed: This Beat requires the default distribution of Elasticsearch. Please install the default distribution of Elasticsearch from elastic.co, or install the oss-only distribution of beats]
So apparently there's a mismatch here as the filebeat in the docker is the non OSS version. Or am I wrong? Are there other way to fix it than you putting another version of filebeat in the dockerbuild?