-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathDockerfileBase
45 lines (35 loc) · 1.53 KB
/
DockerfileBase
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
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y build-essential software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN sudo apt-add-repository universe; apt-get update; \
apt-get install -yq libprocps-dev gcc-11 g++-11 valgrind gawk sed libffi-dev ccache libgoogle-perftools-dev \
yasm texinfo autotools-dev automake python3 python3-pip \
cmake libtool pkg-config autoconf wget git unzip \
libhiredis-dev redis-server openssl libssl-dev doxygen idn2 libgcrypt20-dev \
libargtable2-dev libgnutls28-dev
# python python-pip
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
RUN update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
RUN update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
RUN update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
RUN ln -s /usr/bin/ccache /usr/local/bin/clang && \
ln -s /usr/bin/ccache /usr/local/bin/clang++ && \
ln -s /usr/bin/ccache /usr/local/bin/gcc && \
ln -s /usr/bin/ccache /usr/local/bin/g++ && \
ln -s /usr/bin/ccache /usr/local/bin/cc && \
ln -s /usr/bin/ccache /usr/local/bin/c++
ENV CC gcc-11
ENV CXX g++-11
ENV TARGET all
ENV TRAVIS_BUILD_TYPE Debug
COPY . /consensust
WORKDIR /consensust
RUN cd deps && ./build.sh
RUN ccache -M 20G
RUN mkdir build
WORKDIR build
RUN cmake .. -DCMAKE_BUILD_TYPE=Debug
RUN make -j$(nproc)