mirror of
https://github.com/certat/intelmq-docker.git
synced 2025-12-06 17:22:57 +01:00
Dockerfile
This commit is contained in:
@@ -11,13 +11,8 @@ RUN sudo apt-get update \
|
|||||||
&& sudo rm -rf /var/lib/apt/lists/*
|
&& sudo rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
ADD entrypoint-dev.sh /opt/entrypoint-dev.sh
|
|
||||||
ADD install_reqs_and_deploy_bots /opt/install_reqs_and_deploy_bots.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 \
|
RUN sudo chmod +x /opt/install_reqs_and_deploy_bots.sh \
|
||||||
&& sudo chown intelmq:intelmq /opt/install_reqs_and_deploy_bots.sh
|
&& sudo chown intelmq:intelmq /opt/install_reqs_and_deploy_bots.sh
|
||||||
|
|
||||||
USER intelmq:intelmq
|
USER intelmq:intelmq
|
||||||
|
|
||||||
ENTRYPOINT [ "/opt/entrypoint-dev.sh" ]
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
export INTELMQ_IS_DOCKER=1
|
|
||||||
|
|
||||||
if [[ ${IS_DEV} == "true" ]]
|
|
||||||
then
|
|
||||||
cd /etc/intelmq
|
|
||||||
sudo pip3 install hug url-normalize geolib imbox jinja2 pyasn textx tld time-machine
|
|
||||||
sudo pip3 install --force pymisp[fileobjects,openioc,virustotal]
|
|
||||||
/opt/install_reqs_and_deploy_bots.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo chown -R intelmq:intelmq /etc/intelmq
|
|
||||||
sudo chown -R intelmq:intelmq /opt/intelmq
|
|
||||||
|
|
||||||
intelmqctl upgrade-config
|
|
||||||
intelmqctl check
|
|
||||||
|
|
||||||
intelmq_user="${INTELMQ_API_USER:=intelmq}"
|
|
||||||
intelmq_pass="${INTELMQ_API_PASS:=intelmq}"
|
|
||||||
|
|
||||||
intelmq-api-adduser --user "$intelmq_user" --password "$intelmq_pass"
|
|
||||||
|
|
||||||
if [[ $1 == "selftest" ]]
|
|
||||||
then
|
|
||||||
export INTELMQ_TEST_EXOTIC=1
|
|
||||||
nosetests3 /etc/intelmq/intelmq/tests
|
|
||||||
else
|
|
||||||
cd /etc/intelmq-api && hug -m intelmq_api.serve -p8080
|
|
||||||
fi
|
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
rm -f /tmp/orderfullrequirements.txt /tmp/fullrequirements.txt
|
sudo cp -r $MY_FORK/$MY_BOTS_FOLDER/* /etc/intelmq/intelmq/bots/
|
||||||
for file in $(find /etc/intelmq/intelmq/bots -name "*REQUIREMENTS.txt"); do
|
sudo rm -f /tmp/orderfullrequirements.txt /tmp/fullrequirements.txt
|
||||||
cat $file >> /tmp/fullrequirements.txt
|
for req in $(find $MY_FORK/$MY_BOTS_FOLDER -name "*REQUIREMENTS.txt"); do
|
||||||
|
cat $req >> /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
|
|
||||||
sudo pip3 install --no-cache-dir -e .
|
|
||||||
|
|
||||||
sudo intelmqsetup
|
|
||||||
|
#cd /etc/intelmq
|
||||||
|
#sudo pip3 install --no-cache-dir -e .
|
||||||
|
#sudo intelmqsetup
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
intelmq_logs/
|
intelmq_logs/
|
||||||
intelmq_persistence/
|
intelmq_persistence/
|
||||||
|
my_fork_of_intelmq/
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
- ./example_config/intelmq-api/config.json:/etc/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_fork_of_intelmq/intelmq/:/etc/intelmq/intelmq/
|
- ./my_fork_of_intelmq/:${MY_FORK}/${MY_BOTS_FOLDER}
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
environment:
|
environment:
|
||||||
@@ -36,6 +36,8 @@ 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_fork_of_intelmq"
|
||||||
|
MY_BOTS_FOLDER: "intelmq/bots"
|
||||||
networks:
|
networks:
|
||||||
- intelmq-internal
|
- intelmq-internal
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user