forked from ArduPilot/ardupilot_wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·34 lines (22 loc) · 920 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.10-slim-bullseye
ARG DEBIAN_FRONTEND=noninteractive
ARG USER_NAME=ardupilot_wiki
ARG USER_UID=1000
ARG USER_GID=1000
ARG WORKDIRECTORY=/${USER_NAME}
WORKDIR ${WORKDIRECTORY}
RUN groupadd ${USER_NAME} --gid ${USER_GID}\
&& useradd -l -m ${USER_NAME} -u ${USER_UID} -g ${USER_GID} -s /bin/bash
RUN apt-get update && apt-get install --no-install-recommends -y \
software-properties-common \
lsb-release \
sudo
ENV USER=${USER_NAME}
RUN echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USER_NAME} \
&& chmod 0440 /etc/sudoers.d/${USER_NAME} \
&& chown -R ${USER_NAME}:${USER_NAME} ${WORKDIRECTORY}
USER ${USER_NAME}
COPY Sphinxsetup.sh ${WORKDIRECTORY}/Sphinxsetup.sh
RUN bash -c "${WORKDIRECTORY}/Sphinxsetup.sh" && rm Sphinxsetup.sh
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV PATH="/home/${USER_NAME}/.local/bin:${PATH}"