From 6c62c8aca008ea1e2433080f8c38f0ccd7ca0dce Mon Sep 17 00:00:00 2001 From: ygalnezri Date: Wed, 8 Jan 2025 17:16:02 +0100 Subject: [PATCH] Update docker-compose.yml & Dockerfile --- Watcher/Dockerfile | 25 +++++++++++++++---------- docker-compose.yml | 4 +++- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Watcher/Dockerfile b/Watcher/Dockerfile index d966f1c..85cc41c 100755 --- a/Watcher/Dockerfile +++ b/Watcher/Dockerfile @@ -1,5 +1,10 @@ -FROM nikolaik/python-nodejs:python3.12-nodejs20 -MAINTAINER Ygal NEZRI +FROM nikolaik/python-nodejs:python3.11-nodejs18 + +LABEL title='Watcher' \ + description='Watcher is a Django & React JS automated platform for discovering new potentially cybersecurity threats targeting your organisation.' \ + documentation='https://thalesgroup-cert.github.io/Watcher/' \ + source='https://github.com/thalesgroup-cert/Watcher' \ + maintainer='ygalnezri@icloud.com' # Adding backend directory to make absolute filepaths consistent across services WORKDIR /app/ @@ -7,13 +12,14 @@ WORKDIR /app/ COPY ./ /app/ # Install python-ldap dependencies -RUN apt-get update && apt-get install -y \ - libsasl2-dev \ - libldap2-dev \ - libssl-dev +RUN apt-get update && apt-get install --no-install-recommends -y \ + libsasl2-dev=2.1.28* \ + libldap2-dev=2.5.13* \ + libssl-dev=3.0.15* && \ + rm -rf /var/lib/apt/lists/* # Install Python dependencies -RUN pip install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt # Install nltk.tokenize dependencies RUN python ./nltk_dependencies.py @@ -25,7 +31,7 @@ RUN npm install RUN cp ./wait-for-mysql.sh /tmp/ && cp ./wait_for_mysql.py /tmp/ && chmod u+x /tmp/wait-for-mysql.sh # /app/Watcher : manage.py -WORKDIR Watcher/ +WORKDIR /app/Watcher/ # Collect static files for production purpose RUN python manage.py collectstatic @@ -35,5 +41,4 @@ EXPOSE 9002 # Be sure to use 0.0.0.0 for the host within the Docker container, # otherwise the browser won't be able to find it -CMD python manage.py runserver 0.0.0.0:9002 - +CMD ["python", "manage.py", "runserver", "0.0.0.0:9002"] diff --git a/docker-compose.yml b/docker-compose.yml index 1928195..8533e1d 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,7 +45,9 @@ services: watcher: container_name: watcher - image: felix83000/watcher:latest + build: + context: ./Watcher/ + dockerfile: Dockerfile depends_on: - db_watcher - searx