1 Star 0 Fork 0

安家/jertel-elastalert2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
FROM python:3-slim-buster as builder
LABEL description="ElastAlert 2 Official Image"
LABEL maintainer="Jason Ertel"
COPY . /tmp/elastalert
RUN mkdir -p /opt/elastalert && \
cd /tmp/elastalert && \
pip install setuptools wheel && \
python setup.py sdist bdist_wheel
FROM python:3-slim-buster
ARG GID=1000
ARG UID=1000
ARG USERNAME=elastalert
COPY --from=builder /tmp/elastalert/dist/*.tar.gz /tmp/
RUN apt update && apt -y upgrade && \
apt -y install jq curl gcc libffi-dev && \
rm -rf /var/lib/apt/lists/* && \
pip install /tmp/*.tar.gz && \
rm -rf /tmp/* && \
apt -y remove gcc libffi-dev && \
apt -y autoremove && \
mkdir -p /opt/elastalert && \
echo "#!/bin/sh" >> /opt/elastalert/run.sh && \
echo "set -e" >> /opt/elastalert/run.sh && \
echo "elastalert-create-index --config /opt/elastalert/config.yaml" \
>> /opt/elastalert/run.sh && \
echo "elastalert --config /opt/elastalert/config.yaml \"\$@\"" \
>> /opt/elastalert/run.sh && \
chmod +x /opt/elastalert/run.sh && \
groupadd -g ${GID} ${USERNAME} && \
useradd -u ${UID} -g ${GID} -M -b /opt -s /sbin/nologin \
-c "ElastAlert 2 User" ${USERNAME}
USER ${USERNAME}
ENV TZ "UTC"
WORKDIR /opt/elastalert
ENTRYPOINT ["/opt/elastalert/run.sh"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anjia/jertel-elastalert2.git
git@gitee.com:anjia/jertel-elastalert2.git
anjia
jertel-elastalert2
jertel-elastalert2
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385