forked from keepkey/keepkey-firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
66 lines (55 loc) · 1.7 KB
/
Dockerfile
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
FROM frolvlad/alpine-glibc:glibc-2.27
MAINTAINER [email protected]
RUN apk add --update --no-cache \
bzip2-dev \
ca-certificates \
git \
openssl \
python \
scons \
tar \
w3m \
unzip \
py-setuptools \
make \
cmake
# Install gcc-arm-none-eabi
WORKDIR /root
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
RUN tar xvf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
RUN cp -r gcc-arm-none-eabi-7-2017-q4-major/* /usr/local
RUN rm gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
RUN rm -rf gcc-arm-none-eabi-7-2017-q4-major
# Install protobuf-compiler v3.5.1
WORKDIR /root
RUN mkdir protoc3
RUN wget https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
RUN unzip protoc-3.5.1-linux-x86_64.zip -d protoc3
RUN mv protoc3/bin/* /usr/local/bin
RUN mv protoc3/include/* /usr/local/include
RUN rm -rf protoc3
# Install protobuf/python3 support
WORKDIR /root
RUN wget https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-python-3.5.1.zip
RUN mkdir protobuf-python
RUN unzip protobuf-python-3.5.1.zip -d protobuf-python
WORKDIR /root/protobuf-python/protobuf-3.5.1/python
RUN python setup.py install
# Install nanopb
WORKDIR /root
RUN git clone --branch nanopb-0.2.9.2 https://github.com/nanopb/nanopb/
WORKDIR /root/nanopb/generator/proto
RUN make
RUN rm -rf /root/protobuf-python
# Setup environment
ENV PATH /root/nanopb/generator:$PATH
# Build libopencm3
WORKDIR /root
RUN git clone -b docker-v6 https://github.com/keepkey/libopencm3.git libopencm3
WORKDIR /root/libopencm3
RUN make
RUN apk add --update --no-cache \
clang \
gcc \
g++ \
binutils