-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.base
74 lines (68 loc) · 3.09 KB
/
Dockerfile.base
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
72
73
74
# Copyright (C) 2017-2018 Swift Navigation Inc.
# Contact: Swift Navigation <[email protected]>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
FROM ubuntu:16.04
RUN mkdir /work
WORKDIR /work
ENV TOOLCHAIN_URL_BASE https://toolchains.bootlin.com/downloads/releases/toolchains
ENV TOOLCHAIN_X86_URL ${TOOLCHAIN_URL_BASE}/x86-64-core-i7/tarballs/x86-64-core-i7--glibc--stable-2018.02-2.tar.bz2
ENV TOOLCHAIN_ARM_URL ${TOOLCHAIN_URL_BASE}/armv7-eabihf/tarballs/armv7-eabihf--glibc--stable-2018.02-2.tar.bz2
RUN apt-get update \
&& apt-get install -y wget \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main" \
>/etc/apt/sources.list.d/llvm40.list \
&& echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" \
>/etc/apt/sources.list.d/llvm60.list \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y libcurl4-openssl-dev \
build-essential \
bison \
flex \
ninja-build \
git \
m4 \
gperf \
gawk \
ncurses-dev \
texinfo \
help2man \
binutils-dev \
libpthread-stubs0-dev \
libtinfo-dev \
python \
python-dev \
ccache \
binutils-multiarch-dev \
g++-4.8-arm-linux-gnueabihf \
gcc-4.8-arm-linux-gnueabihf \
gcc-4.8-multilib-arm-linux-gnueabihf \
binutils-arm-linux-gnueabihf \
libgcc1-armhf-cross \
libsfgcc1-armhf-cross \
libstdc++6-armhf-cross \
&& wget -O /tmp/bootlin-toolchain-x86.tbz2 ${TOOLCHAIN_X86_URL} \
&& wget -O /tmp/bootlin-toolchain-arm.tbz2 ${TOOLCHAIN_ARM_URL} \
&& mkdir -p /toolchain/x86 /toolchain/arm \
&& tar -C /toolchain/x86 --strip-components=1 -xvjf \
/tmp/bootlin-toolchain-x86.tbz2 \
&& tar -C /toolchain/arm --strip-components=1 -xvjf \
/tmp/bootlin-toolchain-arm.tbz2 \
&& rm /tmp/bootlin-toolchain-x86.tbz2 /tmp/bootlin-toolchain-arm.tbz2 \
&& mkdir -p cmake-build && cd cmake-build \
&& wget https://cmake.org/files/v3.10/cmake-3.10.1.tar.gz \
&& tar -xzf cmake-3.10.1.tar.gz \
&& cd cmake-3.10.1 \
&& ./configure \
&& make -j8 \
&& make -j8 install \
&& cd .. && rm -rf cmake-* \
&& apt-get clean
# EOF