Skip to content

Commit e59a7cc

Browse files
committedJan 3, 2023
docker esp32: fix failing builds on linux
when building with mos build, the docker container is called with the current userid on the host, which might not necessarily exist within the docker container. The folder of the 'user' (/opt/Espressif) needs to be accessed in the build by this other user, but cannot, as the permission on useradd is set to 0 for others. This works around the issue by extending the permissions for other users
1 parent 027cd3d commit e59a7cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tools/docker/esp32/Dockerfile-esp32-build

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
1919
python2 python2-dev && \
2020
apt-get clean
2121

22-
RUN useradd -d /opt/Espressif -m -s /bin/bash user && chown -R user /opt
22+
RUN useradd -d /opt/Espressif -m -s /bin/bash user && chmod o+rx /opt/Espressif
2323

2424
ARG TARGETARCH
2525
ARG TOOLCHAIN_URLS="https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-${TARGETARCH}.tar.gz https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-${TARGETARCH}.tar.gz https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/xtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch3-linux-${TARGETARCH}.tar.gz"

0 commit comments

Comments
 (0)
Please sign in to comment.