11FROM alpine:latest as py-ea
2- ARG ELASTALERT_VERSION=v0.2.0b2
2+ ARG ELASTALERT_VERSION=1334b611fdd7adf39991a1b0b11689568d612690
33ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
44# URL from which to download Elastalert.
55ARG ELASTALERT_URL=https://github.com/Yelp/elastalert/archive/$ELASTALERT_VERSION.zip
@@ -9,7 +9,7 @@ ENV ELASTALERT_HOME /opt/elastalert
99
1010WORKDIR /opt
1111
12- RUN apk add --update --no-cache ca-certificates openssl-dev openssl python2 -dev python2 py2 -pip py2 -yaml libffi-dev gcc musl-dev wget && \
12+ RUN apk add --update --no-cache ca-certificates openssl-dev openssl python3 -dev python3 py3 -pip py3 -yaml libffi-dev gcc musl-dev wget && \
1313# Download and unpack Elastalert.
1414 wget -O elastalert.zip "${ELASTALERT_URL}" && \
1515 unzip elastalert.zip && \
@@ -19,19 +19,17 @@ RUN apk add --update --no-cache ca-certificates openssl-dev openssl python2-dev
1919WORKDIR "${ELASTALERT_HOME}"
2020
2121# Install Elastalert.
22- # see: https://github.com/Yelp/elastalert/issues/1654
23- RUN sed -i 's/jira>=1.0.10/jira>=1.0.10,<1.0.15/g' setup.py && \
24- python setup.py install && \
25- pip install -r requirements.txt
22+ # With the latest hash we no longer need to monkey with package versions
23+ RUN python3 setup.py install
2624
2725FROM node:alpine
28- LABEL maintainer="BitSensor <dev@bitsensor.io >"
26+ LABEL maintainer="John Belisle <jmb186@gmail.com >"
2927# Set timezone for this container
30- ENV TZ Etc/UTC
28+ ENV TZ America/New_York
3129
32- RUN apk add --update --no-cache curl tzdata python2 make libmagic
33-
34- COPY --from=py-ea /usr/lib/python2.7 /site-packages /usr/lib/python2.7 /site-packages
30+ RUN apk add --update --no-cache curl tzdata python3 make libmagic && \
31+ ln -s /usr/bin/python3 /usr/bin/python
32+ COPY --from=py-ea /usr/lib/python3.8 /site-packages /usr/lib/python3.8 /site-packages
3533COPY --from=py-ea /opt/elastalert /opt/elastalert
3634COPY --from=py-ea /usr/bin/elastalert* /usr/bin/
3735
0 commit comments