forked from ArduPilot/ardupilot_wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
FROM python:3.9-slim-buster | ||
|
||
# Say that we won't answser question | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Make a working directory | ||
WORKDIR /ardupilot_wiki | ||
|
||
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 | ||
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 | ||
|
||
COPY Sphinxsetup.sh /ardupilot_wiki/Sphinxsetup.sh | ||
RUN bash -c "/ardupilot_wiki/Sphinxsetup.sh" && rm Sphinxsetup.sh | ||
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
ENV PATH="/home/${USER_NAME}/.local/bin:${PATH}" |