add change Dockerfile to create build files as user 1000
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
26211ea9ed
commit
5df7ba1178
2 changed files with 11 additions and 7 deletions
4
Makefile
4
Makefile
|
@ -11,11 +11,11 @@ clean:
|
||||||
|
|
||||||
firmware_docker:
|
firmware_docker:
|
||||||
sh -c "docker build -t fiatlux_env docker"
|
sh -c "docker build -t fiatlux_env docker"
|
||||||
sh -c "docker run --volume "$$(pwd)"/firmware:/firmware fiatlux_env make -C firmware all"
|
sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware fiatlux_env make -C firmware all"
|
||||||
|
|
||||||
clean_docker:
|
clean_docker:
|
||||||
sh -c "docker build -t fiatlux_env docker"
|
sh -c "docker build -t fiatlux_env docker"
|
||||||
sh -c "docker run --volume "$$(pwd)"/firmware:/firmware fiatlux_env make -C firmware clean"
|
sh -c "docker run --volume "$$(pwd)"/firmware:/app/firmware fiatlux_env make -C firmware clean"
|
||||||
|
|
||||||
flash:
|
flash:
|
||||||
+@make -C firmware flash
|
+@make -C firmware flash
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM debian:sid
|
FROM debian:sid
|
||||||
RUN apt update && apt install -y make bash gawk g++ gcc libc6-dev flex bison automake autoconf gperf texinfo wget git bzip2 help2man libtool libtool-bin unrar-free unzip ncurses-dev libexpat-dev python-dev python3
|
RUN apt update && apt install -y make bash gawk g++ gcc libc6-dev flex bison automake autoconf gperf texinfo wget git bzip2 help2man libtool libtool-bin unrar-free unzip ncurses-dev libexpat-dev python-dev python3; mkdir /app; chown 1000:1000 /app; cd /app; useradd user;
|
||||||
RUN mkdir modules; git clone --recursive https://github.com/SuperHouse/esp-open-rtos.git modules/rtos; git clone --recursive https://github.com/pfalcon/esp-open-sdk.git modules/sdk
|
USER 1000
|
||||||
RUN sed -i 's/GNU bash, version (3\\\.\[1-9\]|4)/GNU bash, version (3.[1-9]|4|5)/g' modules/sdk/crosstool-NG/configure.ac; mkdir -p modules/sdk/crosstool-NG/.build/tarballs; wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz -O modules/sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz
|
RUN cd app; git clone --recursive https://github.com/SuperHouse/esp-open-rtos.git modules/rtos; git clone --recursive https://github.com/pfalcon/esp-open-sdk.git modules/sdk
|
||||||
RUN cd modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT=y; export CT_ALLOW_BUILD_AS_ROOT_SURE=y; make standalone=y -j$(nproc); wget -N https://raw.githubusercontent.com/espressif/esptool/master/esptool.py -O xtensa-lx106-elf/bin/esptool.py
|
RUN cd app; sed -i 's/GNU bash, version (3\\\.\[1-9\]|4)/GNU bash, version (3.[1-9]|4|5)/g' modules/sdk/crosstool-NG/configure.ac; mkdir -p modules/sdk/crosstool-NG/.build/tarballs; wget https://github.com/libexpat/libexpat/releases/download/R_2_1_0/expat-2.1.0.tar.gz -O modules/sdk/crosstool-NG/.build/tarballs/expat-2.1.0.tar.gz
|
||||||
|
RUN cd app/modules/sdk; export CT_EXPERIMENTAL=y; export CT_ALLOW_BUILD_AS_ROOT=y; export CT_ALLOW_BUILD_AS_ROOT_SURE=y; make standalone=y -j$(nproc); wget -N https://raw.githubusercontent.com/espressif/esptool/master/esptool.py -O xtensa-lx106-elf/bin/esptool.py
|
||||||
|
USER 0
|
||||||
RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial perl
|
RUN apt remove --purge -y python2 && apt autoremove --purge -y && apt install -y python3 python3-serial perl
|
||||||
RUN apt install -y --reinstall python-is-python3
|
RUN apt install -y --reinstall python-is-python3
|
||||||
ENV PATH=/modules/sdk/xtensa-lx106-elf/bin:$PATH
|
USER 1000
|
||||||
|
WORKDIR /app
|
||||||
|
ENV PATH=/app/modules/sdk/xtensa-lx106-elf/bin:$PATH
|
Loading…
Reference in a new issue