2020-03-29 11:59:18 -03:00
|
|
|
FROM ubuntu:18.04
|
2017-11-17 14:29:47 -04:00
|
|
|
WORKDIR /ardupilot
|
|
|
|
|
2020-03-29 11:59:18 -03:00
|
|
|
RUN useradd -U -m ardupilot && \
|
2017-11-17 14:29:47 -04:00
|
|
|
usermod -G users ardupilot
|
|
|
|
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-install-recommends -y \
|
|
|
|
lsb-release \
|
|
|
|
sudo \
|
2020-03-29 11:59:18 -03:00
|
|
|
software-properties-common
|
2017-11-17 14:29:47 -04:00
|
|
|
|
2020-03-29 11:59:18 -03:00
|
|
|
COPY Tools/environment_install/install-prereqs-ubuntu.sh /ardupilot/Tools/environment_install/
|
|
|
|
COPY Tools/completion /ardupilot/Tools/completion/
|
|
|
|
|
|
|
|
# Create non root user for pip
|
2017-11-17 14:29:47 -04:00
|
|
|
ENV USER=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
|
2020-03-29 11:59:18 -03:00
|
|
|
|
|
|
|
ENV SKIP_AP_EXT_ENV=1 SKIP_AP_GRAPHIC_ENV=1 SKIP_AP_COV_ENV=1 SKIP_AP_GIT_CHECK=1
|
|
|
|
RUN Tools/environment_install/install-prereqs-ubuntu.sh -y
|
|
|
|
|
|
|
|
# add waf alias to ardupilot waf to .bashrc
|
|
|
|
RUN echo "alias waf=\"/ardupilot/waf\"" >> ~/.bashrc
|
|
|
|
|
|
|
|
# Check that local/bin are in PATH for pip --user installed package
|
|
|
|
RUN echo "if [ -d \"\$HOME/.local/bin\" ] ; then\nPATH=\"\$HOME/.local/bin:\$PATH\"\nfi" >> ~/.bashrc
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive sudo apt-get clean \
|
2019-11-23 22:30:34 -04:00
|
|
|
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2017-11-17 14:29:47 -04:00
|
|
|
ENV CCACHE_MAXSIZE=1G
|