Merge branch 'pr23-certnupl'

This commit is contained in:
Kamil Mankowski
2023-08-22 15:53:49 +02:00
10 changed files with 38 additions and 64 deletions

View File

@@ -18,12 +18,8 @@ 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
# This section is just for install all the default bots dependencies
RUN for req in $(find /etc/intelmq/intelmq/bots/ -name "*REQUIREMENTS.txt"); do cat $req >> /tmp/fullrequirements.txt; done
RUN cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt
RUN cat /tmp/orderfullrequirements.txt |grep -Eo '(^[^#]+)' | xargs -d "\n" -I {} sh -c 'pip3 install "$1"|| exit 0' sh {}
USER intelmq:intelmq
USER intelmq
ENTRYPOINT [ "/opt/entrypoint-dev.sh" ]

View File

@@ -28,4 +28,3 @@ then
else
cd /etc/intelmq-api && uvicorn intelmq_api.main:app --port 8080 --host 0.0.0.0
fi

View File

@@ -1,12 +1,13 @@
#!/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
for req in $(find $MY_FORK/$MY_BOTS_FOLDER -name "*REQUIREMENTS.txt"); do
cat $req >> /tmp/fullrequirements.txt
echo "" >> /tmp/fullrequirements.txt
done
cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt
sudo pip3 install -r /tmp/orderfullrequirements.txt;
cd /etc/intelmq
cd /opt/intelmq
sudo pip3 install --no-cache-dir -e .
sudo intelmqsetup

View File

@@ -14,8 +14,7 @@ LABEL maintainer="IntelMQ Team <intelmq-team@cert.at>" \
org.opencontainers.image.documentation="https://intelmq.readthedocs.io/en/latest/" \
org.opencontainers.image.vendor="intelmq-team"
###
# libfuzzy-dev is used for pydeep
### libfuzzy-dev is used for pydeep
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sudo \
@@ -50,7 +49,7 @@ COPY ./intelmq-api /opt/intelmq-api
RUN useradd -d /opt/intelmq -U -s /bin/bash intelmq \
&& adduser intelmq sudo \
&& echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& echo "intelmq ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/intelmq \
&& sudo chown -R intelmq:intelmq /opt/intelmq \
&& mkdir -p /opt/intelmq_persistence \
&& sudo chown -R intelmq:intelmq /opt/intelmq_persistence