From fa9175a8f7328d3b3127e2c97a66d4ee33f12f3b Mon Sep 17 00:00:00 2001 From: Jason Solomon Date: Wed, 24 Jun 2020 10:29:35 +1000 Subject: [PATCH] Option to run dfDewey in a Docker container --- docker/Dockerfile | 15 ++++++++++++++- docker/dfdewey | 3 +++ docker/docker-compose.yml | 16 ---------------- 3 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 docker/dfdewey diff --git a/docker/Dockerfile b/docker/Dockerfile index a3611f8..ad6bebd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,6 +16,19 @@ FROM ubuntu:18.04 # Update the base image -RUN apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade +RUN apt update +RUN apt -y install apt-utils && apt -y upgrade && apt -y dist-upgrade # Setup install environment and DFDewey dependencies +RUN apt install -y build-essential git autoconf automake flex gcc g++ libewf-dev libssl-dev zlib1g-dev libxml2-dev dpkg-dev openssl patch wget bison +# TODO(dfjxs): Package and install from GIFT PPA +RUN git clone --recursive https://github.com/simsong/bulk_extractor +RUN cd bulk_extractor && autoheader -f && aclocal -I m4 && autoconf -f && automake --add-missing --copy && ./configure && make -j $(nproc) && make install +RUN rm -Rf ./bulk_extractor + +# Setup dfDewey +RUN git clone https://github.com/google/dfdewey.git +RUN apt install -y python3 python3-pip python3-dev +RUN pip3 install -r dfdewey/requirements.txt +COPY dfdewey /usr/bin/ +RUN chmod a+x /usr/bin/dfdewey diff --git a/docker/dfdewey b/docker/dfdewey new file mode 100644 index 0000000..ef6213d --- /dev/null +++ b/docker/dfdewey @@ -0,0 +1,3 @@ +#!/bin/bash + +python3 /dfdewey/dfdewey/dfdewey.py "$@" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 9f27336..5723e1c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -13,22 +13,6 @@ # limitations under the License. version: '2' services: - # dfdewey: - # build: - # context: ../ - # dockerfile: ./docker/Dockerfile - # links: - # - elasticsearch - # - postgres - # environment: - # - POSTGRES_USER=dfdewey - # - POSTGRES_PASSWORD=password - # - POSTGRES_ADDRESS=postgres - # - POSTGRES_PORT=5432 - # - ELASTIC_ADDRESS=elasticsearch - # - ELASTIC_PORT=9200 - # restart: always - elasticsearch: environment: - discovery.type=single-node