-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk9-filebeat-dockerfile
31 lines (24 loc) · 1.19 KB
/
k9-filebeat-dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This prepares image for running filebeat with gosu
FROM docker.elastic.co/beats/filebeat:6.6.0
USER root
# download gosu and its prerequisites
RUN yum install curl
RUN yum install ca-certificates
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-amd64" \
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.4/gosu-amd64.asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
# copy entrypoint.sh into the image and give execute permission
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
#switch to /usr/share/filebeat folder
WORKDIR /usr/share/filebeat
#copy filebeat.yml into image
COPY k9_docker_filebeat.yml /usr/share/filebeat/filebeat.yml
#provide permission to filebeat.yml
RUN chmod 640 /usr/share/filebeat/filebeat.yml
#launch entrypoint for docker container
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]