feat: update filebeat dockerfile to support arm v7 and v6 (armhf)
This commit is contained in:
parent
c5736fa25b
commit
afbfdd027f
21
Dockerfile
21
Dockerfile
@ -1,4 +1,23 @@
|
|||||||
|
FROM golang:1.18.1-alpine3.15 as builder
|
||||||
ARG ELASTICSTACK_VERSION=8.1.2
|
ARG ELASTICSTACK_VERSION=8.1.2
|
||||||
FROM docker.elastic.co/beats/filebeat:${ELASTICSTACK_VERSION}
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
ENV GOMAXPROCS="4"
|
||||||
|
|
||||||
|
RUN apk update
|
||||||
|
RUN apk add git bash make gcc musl-dev binutils-gold
|
||||||
|
RUN git clone --single-branch --branch="v${ELASTICSTACK_VERSION}" --depth=1 https://github.com/elastic/beats.git
|
||||||
|
RUN cd beats/filebeat/ && \
|
||||||
|
make
|
||||||
|
|
||||||
|
|
||||||
|
FROM alpine:3.15
|
||||||
|
|
||||||
COPY --chown=root:filebeat filebeat.yml /usr/share/filebeat/filebeat.yml
|
COPY --chown=root:filebeat filebeat.yml /usr/share/filebeat/filebeat.yml
|
||||||
|
COPY --chmod=750 --from=builder /build/beats/filebeat/filebeat /usr/local/bin/filebeat
|
||||||
|
COPY --chmod=750 entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["filebeat", "-e", "--strict.perms=false", "-c", "/usr/share/filebeat/filebeat.yml"]
|
18
entrypoint.sh
Normal file
18
entrypoint.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
if [ -n "$ELASTICSEARCH_PASSWORD_FILE" ]; then
|
||||||
|
ELASTICSEARCH_PASSWORD=$(cat "$ELASTICSEARCH_PASSWORD_FILE");
|
||||||
|
export ELASTICSEARCH_PASSWORD;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize kibana stuff related to metric and filebeat
|
||||||
|
filebeat setup --dashboards --index-management -e \
|
||||||
|
-E output.elasticsearch.hosts=["$ELASTICSEARCH_HOSTS"] \
|
||||||
|
-E output.elasticsearch.username="$ELASTICSEARCH_USERNAME" \
|
||||||
|
-E output.elasticsearch.password="$ELASTICSEARCH_PASSWORD" \
|
||||||
|
-E output.elasticsearch.ssl.verification_mode=none \
|
||||||
|
-E setup.kibana.host="$KIBANA_HOSTS" \
|
||||||
|
-E setup.kibana.ssl.verification_mode=none \
|
||||||
|
-c /usr/share/filebeat/filebeat.yml
|
||||||
|
|
||||||
|
exec "$@"
|
@ -12,9 +12,11 @@ processors:
|
|||||||
- add_cloud_metadata: ~
|
- add_cloud_metadata: ~
|
||||||
|
|
||||||
output.elasticsearch:
|
output.elasticsearch:
|
||||||
hosts: '${ELASTICSEARCH_HOSTS:elasticsearch:9200}'
|
hosts: '[${ELASTICSEARCH_HOSTS:elasticsearch:9200}]'
|
||||||
username: '${ELASTICSEARCH_USERNAME:}'
|
username: '${ELASTICSEARCH_USERNAME:}'
|
||||||
password: '${ELASTICSEARCH_PASSWORD:}'
|
password: '${ELASTICSEARCH_PASSWORD:}'
|
||||||
|
ssl:
|
||||||
|
verification_mode: none
|
||||||
|
|
||||||
#filebeat.inputs:
|
#filebeat.inputs:
|
||||||
# - type: container
|
# - type: container
|
||||||
|
Loading…
Reference in New Issue
Block a user