Skip to content

Commit 309548f

Browse files
author
Khanh Nguyen
committed
Revert "Revert "Updated dockerfile based on node:alpine and ivankrizan/elastalert""
This reverts commit e937352.
1 parent 52829ed commit 309548f

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
*.iml
55
.idea/
66
.git/
7+
node_modules/
8+
lib/

Dockerfile

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
FROM node
1+
FROM ivankrizsan/elastalert AS py-ea
2+
3+
FROM node:alpine
24
MAINTAINER BitSensor <[email protected]>
35
EXPOSE 3030
6+
7+
RUN apk update && apk upgrade && apk add python2
8+
9+
COPY --from=py-ea /usr/lib/python2.7/site-packages /usr/lib/python2.7/site-packages
10+
COPY --from=py-ea /opt/elastalert /opt/elastalert
411

5-
RUN apt-get clean && apt-get update && apt-get install -y \
6-
git \
7-
python2.7 \
8-
python2.7-dev \
9-
python-pip
10-
RUN git clone https://github.com/bitsensor/yelp-elastalert.git -b master --depth=1 /opt/elastalert
11-
WORKDIR /opt/elastalert
1212
RUN mkdir server_data
13+
WORKDIR /opt/elastalert-server
14+
COPY . /opt/elastalert-server
15+
16+
RUN npm install --production --quiet
17+
COPY config/elastalert.yaml /opt/elastalert/config.yaml
18+
COPY config/config.json config/config.json
19+
COPY rule_templates/ /opt/elastalert/rule_templates
1320

14-
RUN pip install -r requirements.txt
15-
WORKDIR /opt/elastalert-server
16-
ADD . /opt/elastalert-server
17-
ADD rule_templates/ /opt/elastalert/rule_templates/
18-
ADD rules/ /opt/elastalert/rules/
19-
RUN npm install --production --quiet
20-
ADD config/elastalert.yaml /opt/elastalert/config.yaml
21-
ADD config/elastalert-server.json config/config.json
2221
ENTRYPOINT ["npm", "start"]

0 commit comments

Comments
 (0)