Skip to content

ZanzyTHEbar/pioDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platformio in a Docker container

This is a custom Docker image for Platformio.

Usage

- name: Run Docker container
  uses: addnab/docker-run-action@v3
  with:
    image: ghcr.io/zanzythebar/piodocker:latest
    options: -v ${{ github.workspace }}/ESP:/workspace
    run: |
      export OPENIRIS_CI_BUILD=1
      mkdir build 
      mkdir build/${{ matrix.target_name }}${{ matrix.target_build_type }}
      echo "::group::pio run"
      pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
      echo "::endgroup::"
      unzip -l './build/${{ matrix.target_name }}${{ matrix.target_build_type }}/*.zip'
- name: Verify build
  run: |
    ls -la build/${{ matrix.target_name }}${{ matrix.target_build_type }}

Keep Configuration

If you want to keep the downloaded packages, etc. you can save the PlatformIO configuration outside of the container. You can do this by adding the following line to the docker run call:

-v `$HOME/.platformio`:/.platformio \

Alternatively you could use a data volume container to save the PlatformIO configuration. First create the data volume container

docker run --name vc_platformio zanzythebar/vc_piodocker:latest

Then add the following line to the docker run call:

--volumes-from=vc_platformio \

About

Docker Image for Platformio with ESP32 toolchain pre-installed

Topics

Resources

Stars

Watchers

Forks