An open API service indexing awesome lists of open source software.

https://github.com/zanzythebar/piodocker

Docker Image for Platformio with ESP32 toolchain pre-installed
https://github.com/zanzythebar/piodocker

docker docker-image esp32 platformio

Last synced: 6 months ago
JSON representation

Docker Image for Platformio with ESP32 toolchain pre-installed

Awesome Lists containing this project

README

          

# Platformio in a Docker container

This is a custom Docker image for [Platformio](https://platformio.org/).

## Usage

```yaml
- 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:

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

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

```bash
docker run --name vc_platformio zanzythebar/vc_piodocker:latest
```

Then add the following line to the docker run call:

```bash
--volumes-from=vc_platformio \
```