mirror of
https://github.com/certat/intelmq-docker.git
synced 2025-12-06 09:12:49 +01:00
Fixing some more paths, and something in install_reqs_and_deploy_bots
This commit is contained in:
@@ -1,18 +1,25 @@
|
|||||||
FROM certat/intelmq-full:1.0
|
FROM certat/intelmq-full:latest
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
ADD entrypoint_dev.sh /opt/dev/entrypoint_dev.sh
|
LABEL maintainer="Einar <elanfranco@csirtamericas.org>"
|
||||||
ADD update.sh /opt/dev/update.sh
|
LABEL maintainer="Jeremias <jpretto@cert.unlp.edu.ar>"
|
||||||
ADD merge_BOTS.py /opt/dev/merge_BOTS.py
|
LABEL maintainer="Mateo <mdurante@cert.unlp.edu.ar>"
|
||||||
|
RUN sudo apt-get update \
|
||||||
|
&& sudo apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
vim \
|
||||||
|
ssh \
|
||||||
|
&& sudo rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Merge bots for merge_BOTS.py
|
WORKDIR /opt
|
||||||
RUN sudo python3 -m pip install jsonmerge
|
ADD entrypoint-dev.sh /opt/entrypoint-dev.sh
|
||||||
|
ADD install_reqs_and_deploy_bots /opt/install_reqs_and_deploy_bots.sh
|
||||||
|
RUN sudo chmod +x /opt/entrypoint-dev.sh \
|
||||||
|
&& sudo chown intelmq:intelmq /opt/entrypoint-dev.sh
|
||||||
|
RUN sudo chmod +x /opt/install_reqs_and_deploy_bots.sh \
|
||||||
|
&& sudo chown intelmq:intelmq /opt/install_reqs_and_deploy_bots.sh
|
||||||
|
RUN usermod -aG intelmq www-data
|
||||||
|
|
||||||
USER intelmq:intelmq
|
USER intelmq
|
||||||
|
|
||||||
# Permission denied when installing new bots
|
|
||||||
RUN sudo chown -R intelmq:intelmq /opt/intelmq/intelmq.egg-info
|
|
||||||
|
|
||||||
ENV PATH="/opt/intelmq/.local/bin:${PATH}"
|
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/dev/entrypoint_dev.sh"]
|
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/opt/entrypoint-dev.sh" ]
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
sudo cp -r $MY_FORK/$MY_BOTS_FOLDER/* /etc/intelmq/intelmq/bots/
|
sudo cp -r $MY_FORK/$MY_BOTS_FOLDER/* /opt/intelmq/intelmq/bots/
|
||||||
sudo rm -f /tmp/orderfullrequirements.txt /tmp/fullrequirements.txt
|
sudo rm -f /tmp/orderfullrequirements.txt /tmp/fullrequirements.txt
|
||||||
for req in $(find $MY_FORK/$MY_BOTS_FOLDER -name "*REQUIREMENTS.txt"); do
|
for req in $(find $MY_FORK/$MY_BOTS_FOLDER -name "*REQUIREMENTS.txt"); do
|
||||||
cat $req >> /tmp/fullrequirements.txt
|
cat $req >> /tmp/fullrequirements.txt
|
||||||
|
echo "" >> /tmp/fullrequirements.txt
|
||||||
done
|
done
|
||||||
cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt
|
cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt
|
||||||
sudo pip3 install -r /tmp/orderfullrequirements.txt;
|
sudo pip3 install -r /tmp/orderfullrequirements.txt;
|
||||||
|
|
||||||
cd /etc/intelmq
|
cd /opt/intelmq
|
||||||
sudo pip3 install --no-cache-dir -e .
|
sudo pip3 install --no-cache-dir -e .
|
||||||
sudo intelmqsetup
|
sudo intelmqsetup
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ services:
|
|||||||
image: certunlp/intelmq3-full-dev:latest
|
image: certunlp/intelmq3-full-dev:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./example_config/intelmq/etc/:/opt/intelmq/etc/
|
- ./example_config/intelmq/etc/:/opt/intelmq/etc/
|
||||||
- ./example_config/intelmq-api/config.json:/opt/intelmq/api-config.json
|
- ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json
|
||||||
- ./intelmq_logs:/opt/intelmq/var/log
|
- ./intelmq_logs:/opt/intelmq/var/log
|
||||||
- ./intelmq_output:/opt/intelmq/var/lib/bots
|
- ./intelmq_output:/opt/intelmq/var/lib/bots
|
||||||
- ./my_bots:/my_bots
|
- ./my_bots:/my_bots
|
||||||
@@ -38,7 +38,7 @@ services:
|
|||||||
INTELMQ_SOURCE_PIPELINE_HOST: redis
|
INTELMQ_SOURCE_PIPELINE_HOST: redis
|
||||||
INTELMQ_DESTINATION_PIPELINE_HOST: redis
|
INTELMQ_DESTINATION_PIPELINE_HOST: redis
|
||||||
INTELMQ_REDIS_CACHE_HOST: redis
|
INTELMQ_REDIS_CACHE_HOST: redis
|
||||||
MY_FORK: "/my_bots"
|
MY_FORK: "/my_bots/"
|
||||||
MY_BOTS_FOLDER: "bots"
|
MY_BOTS_FOLDER: "bots"
|
||||||
networks:
|
networks:
|
||||||
- intelmq-internal
|
- intelmq-internal
|
||||||
|
|||||||
Reference in New Issue
Block a user