# Use a lightweight Python base image | |
FROM python:3.9-slim-buster | |
# Set the working directory inside the container | |
WORKDIR /app | |
# Copy the HTML file and the server script into the container | |
# Ensure your HTML file is named 'real_webvm.html' | |
COPY real_webvm.html . | |
COPY run.sh . | |
# Make the run.sh script executable | |
RUN chmod +x run.sh | |
# Expose the port that the server will listen on | |
EXPOSE 8000 | |
# Define the command to run when the container starts | |
# This will execute our run.sh script, which then starts the Python server | |
CMD ["./run.sh"] | |