docs: update cn trans idf-docker-image

This commit is contained in:
mofeifei 2023-11-28 17:39:06 +08:00 committed by Frantisek Hrbata
parent 647c485a76
commit 43bfffd85e
2 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,7 @@ The above command explained:
.. note::
When the mounted directory, ``/project``, contains a git repository owned by a different user (``UID``) than the one running the Docker container, git commands executed within ``/project`` might fail, displaying an error message ``fatal: detected dubious ownership in repository at '/project'``. To resolve this issue, you can designate the ``/project`` directory as safe by setting the IDF_GIT_SAFE_DIR environment variable during the docker container startup. For instance, you can achieve this by including ``-e IDF_GIT_SAFE_DIR='/project'`` as a parameter. Additionally, multiple directories can be specified by using a ``:`` separator. To entirely disable this git security check, ``*`` can be used.
When the mounted directory, ``/project``, contains a git repository owned by a different user (``UID``) than the one running the Docker container, git commands executed within ``/project`` might fail, displaying an error message ``fatal: detected dubious ownership in repository at '/project'``. To resolve this issue, you can designate the ``/project`` directory as safe by setting the IDF_GIT_SAFE_DIR environment variable during the Docker container startup. For instance, you can achieve this by including ``-e IDF_GIT_SAFE_DIR='/project'`` as a parameter. Additionally, multiple directories can be specified by using a ``:`` separator. To entirely disable this git security check, ``*`` can be used.
To build with a specific Docker image tag, specify it as ``espressif/idf:TAG``, for example:

View File

@ -66,6 +66,10 @@ IDF Docker 镜像 (``espressif/idf``) 为使用特定版本的 ESP-IDF 自动化
- ``espressif/idf``:使用标签为 ``latest`` 的 Docker 镜像 ``espressif/idf``。未指定标签时Docker 会隐式添加 ``latest`` 标签。
- ``idf.py build``:在容器内运行此命令。
.. note::
如果挂载目录 ``/project`` 包含的 git 仓库的用户 (``UID``) 不同于运行 Docker 容器的用户,在 ``/project`` 中执行 git 命令可能会失败,并显示错误信息 ``fatal: detected dubious ownership in repository at '/project'``。如需解决此问题,可以在启动 Docker 容器时设置 IDF_GIT_SAFE_DIR 环境变量,将 ``/project`` 目录指定为安全目录。例如,可以将 ``-e IDF_GIT_SAFE_DIR='/project'`` 作为参数包含,还可以使用分隔符 ``:`` 指定多个目录,或使用 ``*`` 完全禁用此项 git 安全检查。
要以特定 Docker 镜像标签进行构建,请将其指定为 ``espressif/idf:TAG``,示例如下:
.. code-block:: bash