mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 04:22:11 +00:00
bump ewsposter to latest master
This commit is contained in:
parent
e914643882
commit
487ce4bed5
1 changed files with 20 additions and 25 deletions
|
@ -1,8 +1,8 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
#
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk -U --no-cache add \
|
RUN apk -U --no-cache add \
|
||||||
build-base \
|
build-base \
|
||||||
|
@ -10,45 +10,40 @@ RUN apk -U --no-cache add \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libssl1.1 \
|
libssl1.1 \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
python-dev \
|
python3 \
|
||||||
py-cffi \
|
python3-dev \
|
||||||
py-ipaddress \
|
py3-cffi \
|
||||||
py-lxml \
|
py3-ipaddress \
|
||||||
py-mysqldb \
|
py3-lxml \
|
||||||
py-pip \
|
py3-mysqlclient \
|
||||||
py-pysqlite \
|
py3-requests \
|
||||||
py-requests \
|
py3-setuptools && \
|
||||||
py-setuptools && \
|
pip3 install --no-cache-dir -U pip && \
|
||||||
pip install --no-cache-dir -U pip && \
|
pip3 install --no-cache-dir configparser hpfeeds3 pyOpenSSL xmljson && \
|
||||||
pip install --no-cache-dir pyOpenSSL xmljson && \
|
#
|
||||||
|
|
||||||
# Setup ewsposter
|
# Setup ewsposter
|
||||||
git clone --depth=1 https://github.com/rep/hpfeeds /opt/hpfeeds && \
|
git clone --depth=1 https://github.com/dtag-dev-sec/ewsposter /opt/ewsposter && \
|
||||||
cd /opt/hpfeeds && \
|
|
||||||
python setup.py install && \
|
|
||||||
git clone --depth=1 https://github.com/vorband/ewsposter /opt/ewsposter && \
|
|
||||||
mkdir -p /opt/ewsposter/spool /opt/ewsposter/log && \
|
mkdir -p /opt/ewsposter/spool /opt/ewsposter/log && \
|
||||||
|
#
|
||||||
# Setup user and groups
|
# Setup user and groups
|
||||||
addgroup -g 2000 ews && \
|
addgroup -g 2000 ews && \
|
||||||
adduser -S -H -u 2000 -D -g 2000 ews && \
|
adduser -S -H -u 2000 -D -g 2000 ews && \
|
||||||
chown -R ews:ews /opt/ewsposter && \
|
chown -R ews:ews /opt/ewsposter && \
|
||||||
|
#
|
||||||
# Supply configs
|
# Supply configs
|
||||||
mv /root/dist/ews.cfg /opt/ewsposter/ && \
|
mv /root/dist/ews.cfg /opt/ewsposter/ && \
|
||||||
mv /root/dist/*.pem /opt/ewsposter/ && \
|
mv /root/dist/*.pem /opt/ewsposter/ && \
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del build-base \
|
apk del build-base \
|
||||||
git \
|
git \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
python-dev \
|
python3-dev \
|
||||||
py-pip \
|
|
||||||
py-setuptools && \
|
py-setuptools && \
|
||||||
rm -rf /root/* && \
|
rm -rf /root/* && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
#
|
||||||
# Run ewsposter
|
# Run ewsposter
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
USER ews:ews
|
USER ews:ews
|
||||||
CMD sleep 10 && exec /usr/bin/python -u /opt/ewsposter/ews.py -l 60
|
CMD sleep 10 && exec /usr/bin/python3 -u /opt/ewsposter/ews.py -l 60
|
||||||
|
|
Loading…
Reference in a new issue