# Force x86_64 architecture for full PlatformIO compatibility FROM --platform=linux/amd64 python:3.11-slim # Install system dependencies RUN apt-get update && apt-get install -y \ git \ curl \ build-essential \ usbutils \ && rm -rf /var/lib/apt/lists/* # Install PlatformIO RUN pip install --no-cache-dir platformio # Set working directory WORKDIR /project # Copy configuration files COPY platformio.ini . # Pre-download platforms and tools (optional, speeds up subsequent builds) RUN pio pkg install --skip-dependencies || true # Default command CMD ["pio", "run"]