esp-idf/tools/docker
Frantisek Hrbata 1ec09cf7b6 fix(tools/docker): set esp-idf repo as safe directory
In our docker docs[1] we recommend to start docker as a non-root user. This has
a side effect, because the esp-idf repo in docker image is owned by
root. Git by default refuses even to parse a config file if the repo is
owned by other than current user. As a result the version detection in
cmake fails[2] and the app version is set to "HEAD-HASH-NOTFOUND".
This adds esp-idf repo to the system git config as a safe one.

[1] https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/
    tools/idf-docker-image.html#building-a-project-with-cmake
[2] https://github.com/espressif/esp-idf/issues/12389#issuecomment-1764268773

Closes https://github.com/espressif/esp-idf/issues/12389

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-10-31 16:13:27 +01:00
..
Dockerfile fix(tools/docker): set esp-idf repo as safe directory 2023-10-31 16:13:27 +01:00
README.md
entrypoint.sh

README.md

ESP-IDF Docker Image

This is a Docker image for the Espressif IoT Development Framework (ESP-IDF). It is intended for building applications and libraries with specific versions of ESP-IDF, when doing automated builds.

This image contains a copy of ESP-IDF and all the tools necessary to build ESP-IDF projects.

Tags

Multiple tags of this image are maintained:

  • latest: tracks master branch of ESP-IDF
  • vX.Y: corresponds to ESP-IDF release vX.Y
  • release-vX.Y: tracks release/vX.Y branch of ESP-IDF

Basic Usage

Build a project located in the current directory using idf.py build command:

docker run --rm -v $PWD:/project -w /project espressif/idf:latest idf.py build

Documentation

For more information about this image and the detailed usage instructions, please refer to the ESP-IDF Programming Guide page: IDF Docker Image.