2017-11-17 14:29:47 -04:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
WORKDIR /ardupilot
|
|
|
|
|
|
|
|
RUN useradd -U -d /ardupilot ardupilot && \
|
|
|
|
usermod -G users ardupilot
|
|
|
|
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
lsb-release \
|
|
|
|
sudo \
|
|
|
|
software-properties-common \
|
2019-11-23 22:30:34 -04:00
|
|
|
python-software-properties
|
2017-11-17 14:29:47 -04:00
|
|
|
|
|
|
|
ENV USER=ardupilot
|
|
|
|
ADD . /ardupilot
|
2019-11-23 22:30:34 -04:00
|
|
|
|
|
|
|
RUN echo "ardupilot ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ardupilot
|
|
|
|
RUN chmod 0440 /etc/sudoers.d/ardupilot
|
|
|
|
|
|
|
|
RUN chown -R ardupilot:ardupilot /ardupilot
|
2017-11-17 14:29:47 -04:00
|
|
|
|
|
|
|
USER ardupilot
|
2019-11-23 22:30:34 -04:00
|
|
|
RUN bash -c "Tools/environment_install/install-prereqs-ubuntu.sh -y"
|
|
|
|
RUN sudo apt-get clean \
|
|
|
|
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2017-11-17 14:29:47 -04:00
|
|
|
ENV CCACHE_MAXSIZE=1G
|
|
|
|
ENV PATH /usr/lib/ccache:/ardupilot/Tools:${PATH}
|
2019-11-23 22:30:34 -04:00
|
|
|
ENV PATH /ardupilot/Tools/autotest:${PATH}
|
|
|
|
ENV PATH /ardupilot/.local/bin:$PATH
|