Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / integrations / docker / images / chip-build / Dockerfile
1 # start with Ubuntu 20.04LTS
2 FROM ubuntu:focal
3
4 VOLUME "/var/source"
5
6 # base build and check tools and libraries layer
7 RUN set -x \
8     && apt-get update \
9     && DEBIAN_FRONTEND=noninteractive apt-get install -fy \
10     autoconf \
11     automake \
12     bison \
13     bridge-utils \
14     clang \
15     clang-format \
16     clang-tidy \
17     cmake \
18     curl \
19     flex \
20     g++ \
21     git \
22     gperf \
23     iproute2 \
24     jq \
25     lcov \
26     libavahi-client-dev \
27     libavahi-common-dev \
28     libcairo2-dev \
29     libdbus-1-dev \
30     libdbus-glib-1-dev \
31     libgif-dev \
32     libglib2.0-dev \
33     libical-dev \
34     libjpeg-dev \
35     libdmalloc-dev \
36     libmbedtls-dev \
37     libncurses5-dev \
38     libncursesw5-dev \
39     libnspr4-dev \
40     libpango1.0-dev \
41     libpixman-1-dev \
42     libreadline-dev \
43     libssl-dev \
44     libtool \
45     libudev-dev \
46     libusb-1.0-0 \
47     libusb-dev \
48     libxml2-dev \
49     make \
50     net-tools \
51     ninja-build \
52     openjdk-8-jdk \
53     pkg-config \
54     python3 \
55     python3-dev \
56     python3-pip \
57     python3-venv \
58     shellcheck \
59     strace \
60     systemd \
61     udev \
62     unzip \
63     wget \
64     zlib1g-dev \
65     && rm -rf /var/lib/apt/lists/ \
66     && : # last line
67
68 # Python 2 and PIP
69 RUN set -x \
70     && apt-get update \
71     && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \
72     && add-apt-repository universe \
73     && DEBIAN_FRONTEND=noninteractive apt-get install -y python python2 \
74     && curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.py \
75     && python2 get-pip.py \
76     && rm -rf /var/lib/apt/lists/ \
77     && : # last line
78
79 RUN set -x \
80     && pip3 install circleci attrs coloredlogs PyGithub pygit future \
81     portpicker mobly                                                 \
82     && : # last line
83
84 # build and install gn
85 RUN set -x \
86     && git clone https://gn.googlesource.com/gn \
87     && cd gn \
88     && python3 build/gen.py \
89     && ninja -C out \
90     && cp out/gn /usr/local/bin \
91     && cd .. \
92     && rm -rf gn \
93     && : # last line
94
95 # Install bloat comparison tools
96 RUN set -x \
97     && git clone https://github.com/google/bloaty.git \
98     && mkdir -p bloaty/build \
99     && cd bloaty/build \
100     && cmake ../ \
101     && make -j8 \
102     && make install \
103     && cd ../.. \
104     && rm -rf bloaty \
105     && : # last line
106
107 # NodeJS: install a newer version than what apt-get would read
108 # This installs the latest LTS version of nodejs
109 RUN set -x \
110     && mkdir node_js \
111     && cd node_js \
112     && wget https://nodejs.org/dist/v12.19.0/node-v12.19.0-linux-x64.tar.xz \
113     && tar xfvJ node-v12.19.0-linux-x64.tar.xz \
114     && mv node-v12.19.0-linux-x64 /opt/ \
115     && ln -s /opt/node-v12.19.0-linux-x64 /opt/node \
116     && ln -s /opt/node/bin/* /usr/bin \
117     && cd .. \
118     && rm -rf node_js \
119     && : # last line