Skip to content

Latest commit

 

History

History
121 lines (81 loc) · 3.77 KB

README.md

File metadata and controls

121 lines (81 loc) · 3.77 KB

MetaDetective Docker Setup

This document offers instructions on how to set up and utilize the Dockerized version of MetaDetective.

Table of Contents

Table of Contents
  1. Getting Started
  2. Using the Pre-built Image
  3. Dockerfile Details

Getting Started

Prerequisites

  • Docker must be installed on your machine.
  • While the Docker image can technically be run on Windows, the provided scripts are written in Bash. Thus, they are designed for environments that support Bash scripting, like Linux.

(🔼 Back to top)

Building the Docker Image

To build and run the Docker image:

# ./start.sh

When executed, this script performs the following actions:

  1. It checks if the metadetective-image already exists. If it doesn't, the script builds one using the provided Dockerfile.
  2. It runs a container named metadetective-container.
  3. Upon completion, you'll be placed inside the container shell, where you're ready to start using MetaDetective.

(🔼 Back to top)

Stopping and Removing Containers and Images

In case you want to stop the running container and/or remove the Docker image:

# ./remove.sh

Executing this script will:

  1. Stop and remove the metadetective-container if it's currently running.
  2. Prompt you with the option to delete the metadetective-image.

(🔼 Back to top)

Using the Pre-built Image

If you'd rather use the pre-built Docker image from Docker Hub, follow these steps:

Pulling the Image

Retrieve the Docker image using:

# docker pull franckferman/metadetective

Running the Container

Start a container based on the image:

# docker run -it --name metadetective franckferman/metadetective /bin/bash

Stopping the Container

# docker stop metadetective

This command will stop the container named "metadetective".

Removing the Container

Once the container is stopped, you can remove it using:

# docker rm metadetective

This command will remove the container named "metadetective".

Troubleshooting container deletion problems

  1. List All Containers (including stopped ones):
# docker ps -a

Check if the container "metadetective" is listed. If it's listed, note the container ID.

  1. Force Remove the Container:
# docker rm -f metadetective

Alternatively, if using the container ID:

# docker rm -f [CONTAINER_ID]

(🔼 Back to top)

Dockerfile Details

Our Docker image is built upon the lightweight foundation of debian:bullseye-slim.

The following essential packages are installed:

python3: The core programming language for running MetaDetective.

python3-pip: Used specifically to fetch and install the MetaDetective release directly from PyPI.

libimage-exiftool-perl: MetaDetective partly relies on this tool for metadata extraction and analysis.

Due to the ENV PATH="/root/.local/bin:${PATH}" setting in the Dockerfile, you can directly launch MetaDetective within the container without needing to navigate to any specific directory. Simply invoke MetaDetective followed by the desired command-line arguments.

(🔼 Back to top)