Skip to content

ShellSweepX Docker

Michael Haag edited this page Jul 23, 2024 · 1 revision

Using the ShellSweepX Dockerfile

This guide explains how to use the Dockerfile provided with ShellSweepX to build and run the application in a Docker container.

Prerequisites

  • Docker installed on your system
  • Git repository of ShellSweepX cloned to your local machine

Steps

  1. Navigate to the ShellSweepX directory

    Open a terminal and change to the directory containing the ShellSweepX code and Dockerfile:

    cd path/to/ShellSweepX
    
  2. Build the Docker image

    Run the following command to build the Docker image:

    docker build -t shellsweepx .
    

    This command builds a Docker image named shellsweepx based on the instructions in the Dockerfile.

  3. Run the Docker container

    After the image is built, you can run it with:

    docker run -p 8080:8080 shellsweepx
    

    This command:

    • Runs a container based on the shellsweepx image
    • Maps port 8080 of the container to port 8080 on your host machine
  4. Accessing the application

    Once the container is running, you can access the ShellSweepX application by opening a web browser and navigating to:

    http://localhost:8080
    

Additional Notes

  • The Dockerfile uses Python 3.9 as the base image.
  • It installs dependencies listed in requirements.txt.
  • The application runs on port 8080 inside the container.
  • The PYTHONUNBUFFERED=1 environment variable ensures that Python output is sent straight to the container log without being buffered.

Troubleshooting

  • If you encounter permission issues, you may need to run Docker commands with sudo.
  • Ensure that port 8080 is not being used by another application on your host machine.
  • Check the Docker logs for any error messages:
    docker logs <container_id>
    

For more detailed information about Docker usage, refer to the official Docker documentation.