@@ -18,11 +18,13 @@ RUN echo "Set disable_coredump false" >> /etc/sudo.conf
18
18
WORKDIR docker
19
19
20
20
# Install required system packages
21
- RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo file python3-dateutil wget fakeroot libssl-dev build-essential software-properties-common
21
+ RUN apt update
22
+ RUN DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends sudo file python3-dateutil wget fakeroot libssl-dev build-essential \
23
+ software-properties-common
22
24
RUN echo "check_certificate = off" > /etc/wgetrc
23
25
24
26
# We use C++ 17 for UnitTestBot, it is available in gcc-9; default gcc for ubuntu:18.04 is gcc-7
25
- RUN add-apt-repository ppa:ubuntu-toolchain-r/test
27
+ RUN if [[ "$OPERATING_SYSTEM_TAG" = "18.04" ]] ; then RUN add-apt-repository ppa:ubuntu-toolchain-r/test ; fi
26
28
RUN apt update && apt install -y --no-install-recommends gcc-9 g++-9 gcc-multilib g++-multilib gcc-9-multilib g++-9-multilib
27
29
28
30
# Set gcc-9 as default gcc version
@@ -31,22 +33,15 @@ RUN sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
31
33
RUN sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 100
32
34
33
35
# install git
34
- RUN apt install -y software-properties-common
35
- RUN apt update
36
- RUN add-apt-repository -y ppa:git-core/ppa
37
- RUN apt update
38
- RUN apt install -y git libcurl4-openssl-dev
36
+ RUN apt install -y software-properties-common git libcurl4-openssl-dev
39
37
40
38
# install others apt
41
- RUN apt install -y --no-install-recommends ninja-build python3-setuptools
42
- RUN apt install -y --no-install-recommends curl libcap-dev libncurses5-dev unzip libtcmalloc-minimal4 libgoogle-perftools-dev libsqlite3-dev doxygen python3-pip
43
- RUN apt -y install autoconf libtool
39
+ RUN apt install -y --no-install-recommends ninja-build python3-setuptools curl libcap-dev libncurses5-dev unzip \
40
+ libtcmalloc-minimal4 libgoogle-perftools-dev libsqlite3-dev doxygen python3-pip autoconf libtool
44
41
45
42
# install vscode dependencies
46
- RUN apt install -y libxshmfence1 libglu1
47
- RUN apt install -y libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev
48
- RUN apt install -y libasound2
49
- RUN apt install -y xvfb
43
+ RUN apt install -y libxshmfence1 libglu1 libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 \
44
+ libgbm-dev libnss3-dev libxss-dev libasound2 xvfb
50
45
51
46
RUN mkdir $UTBOT_ALL && cd $UTBOT_ALL
52
47
@@ -75,15 +70,15 @@ RUN git clone --single-branch --branch "release/${LLVM_VERSION_MAJOR}.x" --depth
75
70
WORKDIR $UTBOT_ALL/llvm-project
76
71
RUN mkdir build && cd build \
77
72
&& $UTBOT_CMAKE_BINARY \
78
- -DCMAKE_BUILD_TYPE=Release \
73
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
79
74
-DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR \
80
75
-DLLVM_INCLUDE_TESTS=OFF \
81
76
-DLLVM_BINUTILS_INCDIR=$UTBOT_ALL/llvm_gold_plugin \
82
77
-DLLVM_ENABLE_RTTI=ON \
83
78
-DLLVM_ENABLE_EH=ON \
84
79
-DLLVM_TARGETS_TO_BUILD="host" \
85
80
-DLLVM_INSTALL_UTILS=ON \
86
- -DLLVM_ENABLE_PROJECTS="clang;libclc;lld;lldb;clang-tools-extra " \
81
+ -DLLVM_ENABLE_PROJECTS="clang;libclc;lld" \
87
82
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;libcxxabi" \
88
83
-G "Ninja" ../llvm \
89
84
&& $UTBOT_CMAKE_BINARY --build . --target install
@@ -110,7 +105,7 @@ RUN mkdir libcxx_build && cd libcxx_build \
110
105
-DLIBCXX_ENABLE_THREADS:BOOL=OFF \
111
106
-DLIBCXX_ENABLE_SHARED:BOOL=ON \
112
107
-DLIBCXXABI_ENABLE_THREADS:BOOL=OFF \
113
- -DCMAKE_BUILD_TYPE:STRING=Release \
108
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
114
109
-DLLVM_TARGETS_TO_BUILD=host \
115
110
-DCMAKE_INSTALL_PREFIX=$UTBOT_ALL/libcxx/install \
116
111
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY:BOOL=ON ../llvm \
@@ -131,7 +126,7 @@ RUN cd $UTBOT_ALL/grpc && git submodule update --init
131
126
RUN cd $UTBOT_ALL/grpc \
132
127
&& mkdir -p cmake/build \
133
128
&& cd cmake/build \
134
- && $UTBOT_CMAKE_BINARY -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR ../.. \
129
+ && $UTBOT_CMAKE_BINARY -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR ../.. \
135
130
&& make -j`nproc` \
136
131
&& make install \
137
132
&& cd $UTBOT_ALL \
@@ -150,7 +145,7 @@ USER utbot
150
145
USER root
151
146
RUN git clone --single-branch -b z3-4.8.17 --depth=1 https://github.com/Z3Prover/z3.git $UTBOT_ALL/z3-src
152
147
RUN cd $UTBOT_ALL/z3-src && mkdir build && cd build && \
153
- $UTBOT_CMAKE_BINARY -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR .. && \
148
+ $UTBOT_CMAKE_BINARY -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$UTBOT_INSTALL_DIR .. && \
154
149
$UTBOT_CMAKE_BINARY --build . --target install && \
155
150
cd $UTBOT_ALL && \
156
151
rm -rf $UTBOT_ALL/z3-src
@@ -172,11 +167,9 @@ RUN if [[ "$OPERATING_SYSTEM_TAG" = "18.04" ]] ; then apt update && apt install
172
167
RUN apt update && apt install -y --no-install-recommends nodejs npm openssh-server net-tools gdb vim-nox rsync
173
168
RUN pip3 install git+https://chromium.googlesource.com/external/gyp
174
169
175
- # Update node and npm since defaults on ubuntu:18.04 have reached end of life
176
- RUN npm config set strict-ssl false
170
+ # Update node and npm
177
171
RUN npm cache clean -f
178
172
RUN sudo -E npm install -g n
179
- RUN echo insecure > ~/.curlrc
180
173
RUN sudo -E n 16
181
174
RUN sudo -E apt remove -y --purge nodejs npm
182
175
@@ -225,6 +218,8 @@ RUN ./configure --make-llvm-lib && make -j`nproc`
225
218
# Download library for access private members
226
219
RUN git clone https://github.com/martong/access_private.git $UTBOT_ALL/access_private
227
220
221
+ RUN apt autoclean
222
+
228
223
RUN chsh -s /bin/bash utbot
229
224
EXPOSE 2020
230
225
CMD ["/usr/sbin/sshd", "-D", "-p 2020"]
0 commit comments