conpot, test reduce build times

This commit is contained in:
t3chn0m4g3 2022-03-12 13:13:31 +00:00
parent 886a7f159e
commit ae52dafdaf
2 changed files with 51 additions and 12 deletions

View file

@ -20,8 +20,29 @@ RUN apk --no-cache -U add \
procps \ procps \
python3 \ python3 \
python3-dev \ python3-dev \
py3-cffi \
py3-cryptography \
py3-freezegun \
py3-gevent \
py3-lxml \
py3-natsort \
py3-pip \ py3-pip \
py3-ply \
py3-psutil \
py3-pycryptodomex \
py3-pytest \
py3-requests \
py3-setuptools \
py3-slugify \
py3-snmp \
py3-sphinx \
py3-wheel \
wget && \ wget && \
#
apk --no-cache -U add -X http://dl-cdn.alpinelinux.org/alpine/3.15/community \
py3-pyserial \
py3-zope-event \
py3-zope-interface && \
# #
# Setup ConPot # Setup ConPot
git clone https://github.com/mushorg/conpot /opt/conpot && \ git clone https://github.com/mushorg/conpot /opt/conpot && \
@ -38,10 +59,8 @@ RUN apk --no-cache -U add \
sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \ sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \
sed -i 's/port="16100"/port="161"/' /opt/conpot/conpot/templates/IEC104/snmp/snmp.xml && \ sed -i 's/port="16100"/port="161"/' /opt/conpot/conpot/templates/IEC104/snmp/snmp.xml && \
sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \ sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \
cp /root/dist/requirements.txt . && \
pip3 install --no-cache-dir --upgrade pip && \ pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -U cffi \
setuptools \
wheel && \
pip3 install --no-cache-dir . && \ pip3 install --no-cache-dir . && \
cd / && \ cd / && \
rm -rf /opt/conpot /tmp/* /var/tmp/* && \ rm -rf /opt/conpot /tmp/* /var/tmp/* && \

20
docker/conpot/dist/requirements.txt vendored Normal file
View file

@ -0,0 +1,20 @@
pysnmp-mibs
pysmi
libtaxii>=1.1.0
crc16
scapy==2.4.3rc1
hpfeeds3
modbus-tk
stix-validator
stix
cybox
bacpypes==0.17.0
pyghmi==1.4.1
mixbox
modbus-tk
cpppo
fs==2.3.0
tftpy
# some freezegun versions broken
pycrypto
sphinx_rtd_theme