# Use an official Python runtime as a parent image FROM debian # Set the working directory in the container WORKDIR /usr/src/app # Create the output directory and set appropriate permissions RUN mkdir -p /usr/src/app && chmod -R 777 /usr/src/app RUN apt-get update && apt-get install python3 -y # Install masscan (you can adjust this if you're using a different tool) RUN apt-get update && \ apt-get install -y masscan libpcap-dev && \ apt-get clean # Copy the script into the container at /usr/src/app RUN apt-get update && apt-get -y install sudo RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo USER docker COPY exclude.txt . # COPY script.sh . # # Make the script executable # RUN sudo chmod +x script.sh # Expose the port the server will run on EXPOSE 7860 RUN sudo su # Run the script and the HTTP server in parallel CMD masscan -p11434 0.0.0.0/0 --exclude-file exclude.txt --rate=10000 --open -oL ollamaports.txt & python3 -m http.server 7860