File size: 733 Bytes
46a6ee3
 
92f446b
46a6ee3
 
92f446b
67bf8ba
 
da08fae
 
7c72aed
 
 
67bf8ba
46a6ee3
20884b8
46a6ee3
92f446b
46a6ee3
 
92f446b
46a6ee3
 
 
da08fae
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use an official Python runtime as a parent image
FROM python:3.9-slim

# 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

# 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
COPY exclude.txt .
COPY script.sh .

# Make the script executable
RUN chmod +x script.sh

# Expose the port the server will run on
EXPOSE 7860

# Run the script and the HTTP server in parallel
CMD ["bash", "-c", "./script.sh & python3 -m http.server 7860"]