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
- Host: GitHub
- URL: https://github.com/zanzythebar/piodocker
- Owner: ZanzyTHEbar
- Created: 2023-03-11T20:02:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-21T12:45:40.000Z (over 2 years ago)
- Last Synced: 2025-02-12T17:46:34.606Z (8 months ago)
- Topics: docker, docker-image, esp32, platformio
- Language: Dockerfile
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 \
```