Merge pull request #5500 from nmaggioni/nm_update_docker_toolchain
[inav.git] / Dockerfile
blobc699617788937bc1385fe2fe9e8091de28240fe0
1 FROM ubuntu:bionic
3 # Configuration
4 VOLUME /home/src/
5 WORKDIR /home/src/
6 ARG TOOLCHAIN_VERSION_SHORT
7 ENV TOOLCHAIN_VERSION_SHORT ${TOOLCHAIN_VERSION_SHORT:-"9-2019q4"}
8 ARG TOOLCHAIN_VERSION_LONG
9 ENV TOOLCHAIN_VERSION_LONG ${TOOLCHAIN_VERSION_LONG:-"9-2019-q4-major"}
11 # Essentials
12 RUN mkdir -p /home/src && \
13     apt-get update && \
14     apt-get install -y software-properties-common ruby make git gcc wget curl bzip2
16 # Toolchain
17 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"
18 RUN mkdir -p /opt && \
19         cd /opt && \
20     tar xvjf "/tmp/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG-x86_64-linux.tar.bz2" -C /opt && \
21         chmod -R -w "/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG"
23 ENV PATH="/opt/gcc-arm-none-eabi-$TOOLCHAIN_VERSION_LONG/bin:$PATH"