1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-13 11:29:56 +03:00

docker build: do not run user commands

This commit is contained in:
Roman Lut 2023-10-03 21:32:13 +02:00
parent aff0034b43
commit ae6b6aa7c0

View file

@ -4,15 +4,15 @@ ARG USER_ID
ARG GROUP_ID ARG GROUP_ID
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y git cmake make ruby gcc python3 python3-pip gcc-arm-none-eabi RUN apt-get update && apt-get install -y git cmake make ruby gcc python3 python3-pip gcc-arm-none-eabi ninja-build
RUN pip install pyyaml RUN pip install pyyaml
# if either of these are already set the same as the user's machine, leave them be and ignore the error # if either of these are already set the same as the user's machine, leave them be and ignore the error
RUN addgroup --gid $GROUP_ID inav; exit 0; RUN if [ -n "$USER_ID" ]; then RUN addgroup --gid $GROUP_ID inav; exit 0; fi
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID inav; exit 0; RUN if [ -n "$USER_ID" ]; then RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID inav; exit 0; fi
USER inav RUN if [ -n "$USER_ID" ]; then USER inav; fi
RUN git config --global --add safe.directory /src RUN git config --global --add safe.directory /src
VOLUME /src VOLUME /src