Skip to content

Add Docker development environment #40

@angeloINTJ

Description

@angeloINTJ

What

Create a Dockerfile and docker-compose.yml so contributors can build and test without installing PlatformIO locally.

Why

Setting up PlatformIO, Python, and the ARM toolchain is the #1 friction point for new contributors. A Docker image eliminates this:

  • docker compose run build — builds firmware
  • docker compose run test — runs unit tests
  • Works identically on Linux, macOS, and Windows

How

  1. Create Dockerfile based on python:3.11-slim:
    FROM python:3.11-slim
    RUN pip install platformio
    RUN pio pkg install --global --platform https://github.com/maxgerhardt/platform-raspberrypi.git
    WORKDIR /workspace
  2. Create docker-compose.yml:
    services:
      build:
        build: .
        volumes: [".:/workspace"]
        command: pio run -e pico_w_release
      test:
        build: .
        volumes: [".:/workspace"]
        command: pio test -e native
  3. Add a short section to CONTRIBUTING.md with Docker instructions
  4. Verify: docker compose run build passes, docker compose run test passes

Acceptance

  • Dockerfile at repo root
  • docker-compose.yml at repo root with build and test services
  • CONTRIBUTING.md updated with Docker quick start
  • docker compose run test passes on a clean checkout
  • Image size under 2 GB

References

  • CONTRIBUTING.md — where setup docs live
  • platformio.ini — build environments

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededtoolsBuild tools, scripts, and developer tooling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions