summaryrefslogtreecommitdiff
path: root/.devcontainer/Dockerfile
blob: 7e961528242bb4b3e746c1274e314a72f6e7fe60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM ubuntu:18.04

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 \
# aarch64 packages
      libffi-dev \
      libssl-dev \
      python3-dev \ 
      rustc \
    && rm -rf /var/cache/apt/* /var/lib/apt/lists/*;

RUN pip3 install adafruit-nrfutil
# required for McuBoot
RUN pip3 install setuptools_rust

WORKDIR /opt/
# build.sh knows how to compile
COPY build.sh .

# Lets get each in a separate docker layer for better downloads
# GCC
# 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
# RUN rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
# NrfSdk
# 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
# McuBoot
# RUN bash -c "source /opt/build.sh; GetMcuBoot;"
RUN git clone https://github.com/JuulLabs-OSS/mcuboot.git
RUN pip3 install -r ./mcuboot/scripts/requirements.txt

RUN adduser infinitime

ENV SOURCES_DIR /workspaces/Pinetime