mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 08:28:12 +01:00
Avoid unsafe git error when container user and file config volume permissions don't match (#6843)
This commit is contained in:
parent
b8d2a6f574
commit
05491e756b
2 changed files with 3 additions and 5 deletions
|
@ -100,6 +100,9 @@ RUN --mount=type=tmpfs,target=/root/.cargo if [ "$TARGETARCH$TARGETVARIANT" = "a
|
||||||
--break-system-packages --no-cache-dir -r /requirements.txt -r /requirements_optional.txt \
|
--break-system-packages --no-cache-dir -r /requirements.txt -r /requirements_optional.txt \
|
||||||
&& /platformio_install_deps.py /platformio.ini --libraries
|
&& /platformio_install_deps.py /platformio.ini --libraries
|
||||||
|
|
||||||
|
# Avoid unsafe git error when container user and file config volume permissions don't match
|
||||||
|
RUN git config --system --add safe.directory '/config/*'
|
||||||
|
|
||||||
|
|
||||||
# ======================= docker-type image =======================
|
# ======================= docker-type image =======================
|
||||||
FROM base AS docker
|
FROM base AS docker
|
||||||
|
|
|
@ -13,11 +13,6 @@ if [ ! -n "$DEVCONTAINER" ] && [ ! -n "$VIRTUAL_ENV" ] && [ ! "$ESPHOME_NO_VENV"
|
||||||
source $location
|
source $location
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Avoid unsafe git error when running inside devcontainer
|
|
||||||
if [ -n "$DEVCONTAINER" ]; then
|
|
||||||
git config --global --add safe.directory "$PWD"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt -r requirements_dev.txt
|
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt -r requirements_dev.txt
|
||||||
pip3 install setuptools wheel
|
pip3 install setuptools wheel
|
||||||
pip3 install -e ".[dev,test,displays]" --config-settings editable_mode=compat
|
pip3 install -e ".[dev,test,displays]" --config-settings editable_mode=compat
|
||||||
|
|
Loading…
Reference in a new issue