-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.cortexm
72 lines (50 loc) · 2.42 KB
/
Dockerfile.cortexm
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# For help with editing and block commenting add plugin to sublime
#macos
#Press cmd(⌘)-shift-p and type "add repo".
#Then paste in the GitHub address for this package:
#https://github.com/jaytaylor/Dockerfile.sublime-syntax
#Press cmd(⌘)-shift-p and type "install".
#Enter "Dockerfile.sublime-syntax" and press enter.
#Restart Sublime
#windows
#Replace cmd(⌘) with Ctrl
#usage:
# e.g.
# docker build -t lager .
# docker run --name lager_bash --rm -it lager bash
FROM ubuntu:20.04
MAINTAINER Akbar Dhanaliwala <[email protected]>
WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
# Download tools(including gcc), prerequisites
RUN apt-get update && \
apt-get install -y wget curl git unzip bzip2 build-essential gcc-multilib pkg-config python python-setuptools python3 \
python3-pip python3-setuptools python-cryptography python-pyparsing python-pyelftools nano bash \
ruby gcc-arm-none-eabi clang cmake ninja-build libncurses-dev flex bison gperf ccache libffi-dev libssl-dev dfu-util \
libnss3-tools libnss3 libpython2.7\
&& apt-get clean all
ENV GNU_INSTALL_ROOT /usr/bin/
ENV GNU_PREFIX arm-none-eabi
#Install FTDI D2XX driver
RUN curl -fSL -A "Mozilla/4.0" -o /tmp/libftd2xx-x86_64-1.4.8.gz "https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.8.gz"
RUN cd /tmp && tar -xvzf /tmp/libftd2xx-x86_64-1.4.8.gz
RUN cp /tmp/release/build/lib* /usr/local/lib/ 2>/dev/null || :
RUN cd /usr/local/lib && ln -s libftd2xx.so.1.4.8 libftd2xx.so && chmod 0755 libftd2xx.so.1.4.8 && rm -rf /tmp/release /tmp/libftd2xx-x86_64-1.4.8.gz
ENV PATH=$PATH:/usr/local/lib
# Install nanopb and protoc
ENV PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
RUN unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
RUN unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
RUN rm -f $PROTOC_ZIP
RUN curl -fSL -A "Mozilla/4.0" -o /tmp/nanopb-0.4.1-linux-x86.tar.gz "https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.1-linux-x86.tar.gz"
RUN cd /tmp && tar -xvzf /tmp/nanopb-0.4.1-linux-x86.tar.gz
RUN mkdir -p /opt/nanopb
RUN cp -r /tmp/nanopb-0.4.1-linux-x86 /opt && rm -rf /tmp/nanopb-0.4.1-linux-x86.tar.gz /tmp/nanopb-0.4.1-linux-x86
RUN cd /opt && mv nanopb-0.4.1-linux-x86 nanopb
RUN pip3 install protobuf
ENV PATH=$PATH:/opt/nanopb/nanopb-0.4.1-linux-x86/generator-bin
#install ceedling build system
RUN gem install ceedling
#install Lager
RUN pip3 install 'lager-cli==0.1.98'