mirror of
https://github.com/certat/intelmq-docker.git
synced 2025-12-06 17:22:57 +01:00
Wagner suggestions
This commit is contained in:
@@ -3,20 +3,17 @@ FROM certat/intelmq-full:1.0
|
|||||||
MAINTAINER Einar <elanfranco@cert.unlp.edu.ar>
|
MAINTAINER Einar <elanfranco@cert.unlp.edu.ar>
|
||||||
MAINTAINER Jeremias <jpretto@cert.unlp.edu.ar>
|
MAINTAINER Jeremias <jpretto@cert.unlp.edu.ar>
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
ADD entrypoint_dev.sh /opt/dev/entrypoint_dev.sh
|
ADD entrypoint_dev.sh /opt/dev/entrypoint_dev.sh
|
||||||
ADD update.sh /opt/dev/update.sh
|
ADD update.sh /opt/dev/update.sh
|
||||||
ADD merge_BOTS.py /opt/dev/merge_BOTS.py
|
ADD merge_BOTS.py /opt/dev/merge_BOTS.py
|
||||||
|
|
||||||
# Merge bots for merge_BOTS.py
|
# Merge bots for merge_BOTS.py
|
||||||
RUN python3 -m pip install jsonmerge
|
RUN sudo python3 -m pip install jsonmerge
|
||||||
|
|
||||||
|
|
||||||
# Permission denied when installing new bots
|
# Permission denied when installing new bots
|
||||||
RUN chown -R intelmq:intelmq /opt/intelmq/intelmq.egg-info
|
RUN sudo chown -R intelmq:intelmq /opt/intelmq/intelmq.egg-info
|
||||||
|
|
||||||
USER intelmq:intelmq
|
|
||||||
ENV PATH="/opt/intelmq/.local/bin:${PATH}"
|
ENV PATH="/opt/intelmq/.local/bin:${PATH}"
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/dev/entrypoint_dev.sh"]
|
ENTRYPOINT ["/opt/dev/entrypoint_dev.sh"]
|
||||||
|
|||||||
@@ -3,18 +3,24 @@
|
|||||||
echo "Installing requirements for bots in dev repository"
|
echo "Installing requirements for bots in dev repository"
|
||||||
for file in $(find /opt/dev/mybots -name "*REQUIREMENTS.txt"); do pip3 install -r $file; done
|
for file in $(find /opt/dev/mybots -name "*REQUIREMENTS.txt"); do pip3 install -r $file; done
|
||||||
|
|
||||||
# Backup Original BOTS
|
if [ test -f /opt/intelmq/intelmq/bots/BOTS ]; then
|
||||||
cp /opt/intelmq/intelmq/bots/BOTS /opt/intelmq/intelmq/bots/BOTS.bk
|
if [ "${AUTO_MIX_BOTS}" = "true" ]; then
|
||||||
|
# Backup Original BOTS
|
||||||
echo "Merge your BOTS file with BOTS"
|
cp /opt/intelmq/intelmq/bots/BOTS /opt/intelmq/intelmq/bots/BOTS.bk
|
||||||
python3 /opt/dev/merge_BOTS.py "/opt/dev/mybots/BOTS" "/opt/intelmq/intelmq/bots/BOTS" "/opt/intelmq/intelmq/bots/BOTS"
|
echo "Merge your BOTS file with BOTS"
|
||||||
cp /opt/intelmq/intelmq/bots/BOTS /opt/intelmq/etc/BOTS
|
python3 /opt/dev/merge_BOTS.py "/opt/dev/mybots/BOTS" "/opt/intelmq/intelmq/bots/BOTS" "/opt/intelmq/intelmq/bots/BOTS"
|
||||||
|
cp /opt/intelmq/intelmq/bots/BOTS /opt/intelmq/etc/BOTS
|
||||||
echo "Copying BOTS"
|
echo "Copying BOTS"
|
||||||
cp -a /opt/dev/mybots/bots/* /opt/intelmq/intelmq/bots/
|
cp -a /opt/dev/mybots/bots/* /opt/intelmq/intelmq/bots/
|
||||||
|
# Restore original BOTS
|
||||||
|
mv /opt/intelmq/intelmq/bots/BOTS.bk /opt/intelmq/intelmq/bots/BOTS
|
||||||
|
else
|
||||||
|
cp /opt/intelmq/etc/BOTS /opt/intelmq/intelmq/bots/BOTS
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Installing new BOTS"
|
echo "Installing new BOTS"
|
||||||
cd /opt/intelmq && pip3 install -e . --user && python3 setup.py install --user
|
cd /opt/intelmq && pip3 install -e . --user && python3 setup.py install --user
|
||||||
|
|
||||||
# Restore original BOTS
|
|
||||||
mv /opt/intelmq/intelmq/bots/BOTS.bk /opt/intelmq/intelmq/bots/BOTS
|
|
||||||
|
|||||||
Reference in New Issue
Block a user