2019-10-30 10:11:49 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for elastalert
|
|
|
|
#
|
|
|
|
|
2020-05-11 05:32:20 +02:00
|
|
|
FROM python:3-alpine
|
2019-10-30 10:11:49 +02:00
|
|
|
|
2020-05-11 08:12:16 +02:00
|
|
|
ENV ELASTALERT_VERSION=0.2.4
|
2019-10-30 10:11:49 +02:00
|
|
|
ENV ELASTALERT_HOME=/opt/elastalert
|
2019-10-30 12:57:53 +02:00
|
|
|
ENV TZ=UTC
|
2021-07-21 12:38:15 +02:00
|
|
|
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
2019-10-30 10:11:49 +02:00
|
|
|
|
|
|
|
WORKDIR ${ELASTALERT_HOME}
|
|
|
|
|
|
|
|
RUN set -xe \
|
2019-10-30 12:57:53 +02:00
|
|
|
&& apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
curl \
|
|
|
|
libffi \
|
|
|
|
libmagic \
|
|
|
|
libssl1.1 \
|
|
|
|
musl \
|
|
|
|
tzdata \
|
2019-10-30 10:11:49 +02:00
|
|
|
&& apk add --no-cache -t .build-deps \
|
|
|
|
build-base \
|
|
|
|
libffi-dev \
|
|
|
|
musl-dev \
|
|
|
|
openssl-dev \
|
2019-10-30 12:57:53 +02:00
|
|
|
python3-dev \
|
2021-07-01 21:32:49 +02:00
|
|
|
&& pip install --no-cache-dir elastalert==${ELASTALERT_VERSION} \
|
2019-10-30 10:11:49 +02:00
|
|
|
&& mkdir -p rules \
|
|
|
|
&& curl -sSL https://github.com/Yelp/elastalert/raw/${ELASTALERT_VERSION}/config.yaml.example > config.yaml \
|
|
|
|
&& apk del .build-deps
|
|
|
|
|
|
|
|
VOLUME ${ELASTALERT_HOME}
|
|
|
|
|
|
|
|
CMD ["elastalert", "--config", "config.yaml"]
|