mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-21 15:25:29 +03:00
* Use non-root user in Docker build and update docs * Exclude cruft from Docker build context
26 lines
886 B
Docker
26 lines
886 B
Docker
FROM ubuntu:bionic
|
|
|
|
# Configuration
|
|
VOLUME /home/src/
|
|
WORKDIR /home/src/
|
|
ARG TOOLCHAIN_VERSION_SHORT
|
|
ENV TOOLCHAIN_VERSION_SHORT ${TOOLCHAIN_VERSION_SHORT:-"9-2019q4"}
|
|
ARG TOOLCHAIN_VERSION_LONG
|
|
ENV TOOLCHAIN_VERSION_LONG ${TOOLCHAIN_VERSION_LONG:-"9-2019-q4-major"}
|
|
|
|
# Essentials
|
|
RUN mkdir -p /home/src && \
|
|
apt-get update && \
|
|
apt-get install -y software-properties-common ruby make git gcc wget curl bzip2
|
|
|
|
# Toolchain
|
|
RUN wget -P /tmp "https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOLCHAIN_VERSION_SHORT/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2"
|
|
RUN mkdir -p /opt && \
|
|
cd /opt && \
|
|
tar xvjf "/tmp/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2" -C /opt && \
|
|
chmod -R -w "/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG"
|
|
|
|
ENV PATH="/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG/bin:$PATH"
|
|
|
|
RUN useradd inav
|
|
USER inav
|