Skip to content

Commit

Permalink
Docker: add Dockerfile for Docker container support
Browse files Browse the repository at this point in the history
  • Loading branch information
acwatkins authored and peterbarker committed Sep 5, 2018
1 parent a962119 commit 2fe3535
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 \
python-software-properties && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV USER=ardupilot
ADD . /ardupilot
RUN chown -R ardupilot:ardupilot /ardupilot && \
bash -c "Tools/scripts/install-prereqs-ubuntu.sh -y && apt-get install gcc-arm-none-eabi -y" && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

USER ardupilot
ENV CCACHE_MAXSIZE=1G
ENV PATH /usr/lib/ccache:/ardupilot/Tools:${PATH}
4 changes: 3 additions & 1 deletion Tools/scripts/install-prereqs-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ fi

sudo usermod -a -G dialout $USER

$APT_GET remove modemmanager
if dpkg-query -l "modemmanager"; then
$APT_GET remove modemmanager
fi
$APT_GET update

if apt-cache search python-wxgtk3.0 | grep wx; then
Expand Down

0 comments on commit 2fe3535

Please sign in to comment.