File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,15 +6,13 @@ ARG GDB
66
77ENV DEBIAN_FRONTEND=noninteractive
88
9- RUN apt-get update && apt-get install -y git cmake make ruby gcc python3 python3-pip gcc-arm-none-eabi ninja-build
9+ RUN apt-get update && apt-get install -y git cmake make ruby gcc python3 python3-yaml ninja-build gcc-arm-none-eabi
1010
1111RUN if [ "$GDB" = "yes" ]; then apt-get install -y gdb; fi
1212
13- RUN pip install pyyaml
14-
15- # add inav user and group
16- RUN addgroup --gid $GROUP_ID inav
17- RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID inav
13+ # If a group and user with the same IDs already exist, rename the group and recreate the user after deleting the existing one.
14+ RUN GROUP="$(id -n -g $GROUP_ID)" ; if [ -n "$GROUP" ]; then groupmod -n inav "$GROUP" ; else groupadd --gid $GROUP_ID inav; fi
15+ RUN USER="$(id -n -u $USER_ID)" ; if [ -n "$USER" ]; then userdel -r "$USER" ; fi && useradd -m --uid $USER_ID --gid $GROUP_ID inav
1816
1917USER inav
2018
You can’t perform that action at this time.
0 commit comments