-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from jgregmac/master
Dockerfile and Base Path changes
- Loading branch information
Showing
7 changed files
with
83 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM python:alpine as builder | ||
|
||
LABEL description="Elastalert 2 Official Image" | ||
LABEL maintainer="Jason Ertel (jertel at codesim.com)" | ||
|
||
RUN apk --update upgrade && \ | ||
rm -rf /var/cache/apk/* && \ | ||
mkdir -p /tmp/elastalert | ||
|
||
COPY . /tmp/elastalert | ||
|
||
RUN mkdir -p /opt/elastalert && \ | ||
cd /tmp/elastalert && \ | ||
pip install setuptools wheel && \ | ||
python setup.py sdist bdist_wheel | ||
|
||
FROM python:alpine | ||
|
||
COPY --from=builder /tmp/elastalert/dist/*.tar.gz /tmp/ | ||
|
||
RUN apk --update upgrade && \ | ||
apk add gcc libffi-dev musl-dev python3-dev openssl-dev tzdata libmagic cargo jq curl && \ | ||
pip install /tmp/*.tar.gz && \ | ||
apk del gcc libffi-dev musl-dev python3-dev openssl-dev cargo && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
RUN mkdir -p /opt/elastalert && \ | ||
echo "#!/bin/sh" >> /opt/elastalert/run.sh && \ | ||
echo "set -e" >> /opt/elastalert/run.sh && \ | ||
echo "elastalert-create-index --config /opt/config/elastalert_config.yaml" >> /opt/elastalert/run.sh && \ | ||
echo "elastalert --config /opt/config/elastalert_config.yaml \"\$@\"" >> /opt/elastalert/run.sh && \ | ||
chmod +x /opt/elastalert/run.sh | ||
|
||
ENV TZ "UTC" | ||
|
||
WORKDIR /opt/elastalert | ||
ENTRYPOINT ["/opt/elastalert/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters