File size: 984 Bytes
da14227
 
f2daacd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
da14227
 
f2daacd
da14227
 
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
29
30
# Use the official Kali Linux image as the base image
FROM kalilinux/kali-rolling

# Set environment variables for the registration code
ENV R3_REGISTRATION_CODE="B78B8E36-9665-5A9E-9B69-3B86CAC31F7C"

# Install necessary packages
RUN apt-get update && apt-get install -y \
    curl \
    python3 \
    && apt-get clean

# Install remote.it agent
RUN sh -c "$(curl -L https://downloads.remote.it/remoteit/install_agent.sh)"

# Create a new user 'motoe' with the password '123456'
RUN useradd -m -s /bin/bash motoe && echo "motoe:123456" | chpasswd

# Switch to the new user
USER motoe

# Create a directory for the HTTP server and create a simple index.html
RUN mkdir -p /home/motoe/webserver && echo '<html><body><h1>It works!</h1></body></html>' > /home/motoe/webserver/index.html

# Expose the necessary port for the HTTP server
EXPOSE 7860

# Command to run the HTTP server
CMD ["python3", "-m", "http.server", "--bind", "0.0.0.0", "--directory", "/home/motoe/webserver", "7860"]