2021-07-25 23:12:34 +03:00
FROM ubuntu:latest
2021-02-25 19:18:08 +03:00
ARG DEBIAN_FRONTEND = noninteractive
RUN apt-get update -qq \
&& apt-get install -y \
# x86_64 / generic packages
bash \
build-essential \
cmake \
git \
make \
python3 \
python3-pip \
tar \
unzip \
wget \
curl \
2021-02-26 11:14:30 +03:00
dos2unix \
2021-08-09 03:16:17 +03:00
clang-format-12 \
2021-02-26 18:09:58 +03:00
clang-tidy \
2021-07-25 23:12:34 +03:00
locales \
libncurses5 \
2021-02-25 19:18:08 +03:00
# aarch64 packages
libffi-dev \
libssl-dev \
python3-dev \
rustc \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*;
2021-07-25 23:12:34 +03:00
#SET LOCALE
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
2021-02-25 19:18:08 +03:00
RUN pip3 install adafruit-nrfutil
# required for McuBoot
RUN pip3 install setuptools_rust
WORKDIR /opt/
2021-02-25 20:49:40 +03:00
# build.sh knows how to compile but it problimatic on Win10
2021-02-25 19:18:08 +03:00
COPY build.sh .
2021-07-25 23:12:34 +03:00
RUN chmod +x build.sh
2021-02-25 20:49:40 +03:00
# create_build_openocd.sh uses cmake to crate to build directory
COPY create_build_openocd.sh .
2021-07-25 23:12:34 +03:00
RUN chmod +x create_build_openocd.sh
2021-02-25 19:18:08 +03:00
# Lets get each in a separate docker layer for better downloads
# GCC
2021-02-25 20:16:01 +03:00
# RUN bash -c "source /opt/build.sh; GetGcc;"
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -O - | tar -xj -C /opt
2021-02-25 19:18:08 +03:00
# NrfSdk
2021-02-25 20:16:01 +03:00
# RUN bash -c "source /opt/build.sh; GetNrfSdk;"
RUN wget -q "https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip" -O /tmp/nRF5_SDK_15.3.0_59ac345
RUN unzip -q /tmp/nRF5_SDK_15.3.0_59ac345 -d /opt
RUN rm /tmp/nRF5_SDK_15.3.0_59ac345
2021-02-25 19:18:08 +03:00
# McuBoot
2021-02-25 20:16:01 +03:00
# RUN bash -c "source /opt/build.sh; GetMcuBoot;"
2021-10-17 02:31:21 +03:00
RUN git clone https://github.com/mcu-tools/mcuboot.git
2021-02-25 20:16:01 +03:00
RUN pip3 install -r ./mcuboot/scripts/requirements.txt
RUN adduser infinitime
2021-02-25 19:18:08 +03:00
2021-07-25 23:12:34 +03:00
ENV NRF5_SDK_PATH /opt/nRF5_SDK_15.3.0_59ac345
ENV ARM_NONE_EABI_TOOLCHAIN_PATH /opt/gcc-arm-none-eabi-9-2020-q2-update
ENV SOURCES_DIR /workspaces/InfiniTime