| # Use a minimal Python base image | |
| FROM python:3.11-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the Python script into the container | |
| COPY detect_hypervisor.py . | |
| # Command to run the script when the container starts | |
| # The script relies on reading system files, so the container will still need | |
| # to be run with the necessary volume mounts. | |
| ENTRYPOINT ["python", "detect_hypervisor.py"] | |
| # Note: The instructions for running the container will be updated to reflect | |
| # the need to mount the /sys filesystem for accurate detection. |