diff --git a/.docker/intelmq-full-dev/Dockerfile b/.docker/intelmq-full-dev/Dockerfile index 712aa3b..fad5430 100644 --- a/.docker/intelmq-full-dev/Dockerfile +++ b/.docker/intelmq-full-dev/Dockerfile @@ -19,11 +19,7 @@ RUN sudo chmod +x /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 -# 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" ] diff --git a/.docker/intelmq-full-dev/entrypoint-dev.sh b/.docker/intelmq-full-dev/entrypoint-dev.sh index b3f45ff..5c031a8 100644 --- a/.docker/intelmq-full-dev/entrypoint-dev.sh +++ b/.docker/intelmq-full-dev/entrypoint-dev.sh @@ -24,8 +24,7 @@ fi if [[ $1 == "selftest" ]] then export INTELMQ_TEST_EXOTIC=1 - nosetests3 /etc/intelmq/intelmq/tests + nosetests3 /opt/intelmq/intelmq/tests else - cd /etc/intelmq-api && hug -m intelmq_api.serve -p8080 -fi - + cd /opt/intelmq-api && hug -m intelmq_api.serve -p8080 +fi \ No newline at end of file diff --git a/.docker/intelmq-full/Dockerfile b/.docker/intelmq-full/Dockerfile index 7983b50..7c67eec 100644 --- a/.docker/intelmq-full/Dockerfile +++ b/.docker/intelmq-full/Dockerfile @@ -14,8 +14,7 @@ LABEL maintainer="IntelMQ Team " \ 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 \ @@ -46,7 +45,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" >> /opt/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 diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 01bd74a..40f5a2c 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -18,13 +18,14 @@ services: networks: - intelmq-internal intelmq: - build: .docker/intelmq-full-dev + # build: .docker/intelmq-full-dev + image: certunlp/intelmq3-full-dev:latest volumes: - - ./example_config/intelmq/etc/:/opt/intelmq/etc/ - - ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json - - ./intelmq_logs:/opt/intelmq/var/log - - ./intelmq_output:/opt/intelmq/var/lib/bots - - ./my_bots:/my_bots + - ./example_config/intelmq/etc/:/opt/intelmq/etc/ + - ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json + - ./intelmq_logs:/opt/intelmq/var/log + - ./intelmq_output:/opt/intelmq/var/lib/bots + - ./my_bots:/my_bots depends_on: - redis environment: