Skip to content

fix(docker): Add docker tag to run scripts in 5.1 branch #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Multiple tags of this image are maintained:
## Basic Usage

```bash
docker run --rm -it -e "TERM=xterm-256color" -v <path to arduino-esp32>:/arduino-esp32 espressif/esp32-arduino-lib-builder:latest
docker run --rm -it -e "TERM=xterm-256color" -v <path to arduino-esp32>:/arduino-esp32 espressif/esp32-arduino-lib-builder:release-v5.1
```

The above command explained:
Expand All @@ -35,18 +35,16 @@ The above command explained:
- `-t`: Allocates a pseudo-TTY.
- `-e "TERM=xterm-256color"`: Optional. Sets the terminal type to `xterm-256color` to display colors correctly.
- `-v <path to arduino-esp32>:/arduino-esp32`: Optional. Mounts the Arduino Core for ESP32 repository at `/arduino-esp32` inside the container. Replace `<path to arduino-esp32>` with the path to the repository on the host machine. If not provided, the container will not copy the compiled libraries to the host machine.
- `espressif/esp32-arduino-lib-builder:latest`: The Docker image to use.
- `espressif/esp32-arduino-lib-builder:release-v5.1`: The Docker image to use.

After running the above command, you will be inside the container and can build the libraries using the user interface.

By default the docker container will run the user interface script. If you want to run a specific command, you can pass it as an argument to the docker run command. For example, to run a terminal inside the container, you can run:

```bash
docker run -it espressif/esp32-arduino-lib-builder:latest /bin/bash
docker run -it espressif/esp32-arduino-lib-builder:release-v5.1 /bin/bash
```

## Documentation

<!-- Pending: Add link to the full documentation. -->

For more information about this image and the detailed usage instructions, please refer to the Arduino Core for ESP32 documentation.
For more information about this image and the detailed usage instructions, please refer to the [Arduino Core for ESP32 documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/lib_builder.html#docker-image).
5 changes: 4 additions & 1 deletion tools/docker/run.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This is an example of how to run the docker container.
# This script is not part of the container, it is meant to be run on the host machine.
# Note that this file will build the release/v5.1 branch. For other branches, change the tag accordingly.
# You can check the available tags at https://hub.docker.com/r/espressif/esp32-arduino-lib-builder/tags
# As this script is unsigned, you may need to run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` before running it.
# Usage: .\run.ps1 <path_to_arduino_esp32>

# Exit on error
Expand Down Expand Up @@ -58,4 +61,4 @@ if ($env:LIBBUILDER_GIT_SAFE_DIR) {
}

Write-Output "Running: docker run $($DOCKER_ARGS -join ' ') espressif/esp32-arduino-lib-builder"
docker run @($DOCKER_ARGS) espressif/esp32-arduino-lib-builder
docker run @($DOCKER_ARGS) espressif/esp32-arduino-lib-builder:release-v5.1
4 changes: 3 additions & 1 deletion tools/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# This is an example of how to run the docker container.
# This script is not part of the container, it is meant to be run on the host machine.
# Note that this file will build the release/v5.1 branch. For other branches, change the tag accordingly.
# You can check the available tags at https://hub.docker.com/r/espressif/esp32-arduino-lib-builder/tags
# Usage: ./run.sh <path_to_arduino_esp32>

if ! [ -x "$(command -v docker)" ]; then
Expand Down Expand Up @@ -31,4 +33,4 @@ if [ -n "$LIBBUILDER_GIT_SAFE_DIR" ]; then
fi

echo "Running: docker run ${DOCKER_ARGS[@]} espressif/esp32-arduino-lib-builder"
docker run ${DOCKER_ARGS[@]} espressif/esp32-arduino-lib-builder
docker run ${DOCKER_ARGS[@]} espressif/esp32-arduino-lib-builder:release-v5.1