-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-mac
61 lines (51 loc) · 2.11 KB
/
Dockerfile-mac
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
FROM ubuntu:bionic
ARG cores=8
ENV ecores=$cores
RUN apt update \
&& apt install -y --no-install-recommends \
software-properties-common \
ca-certificates \
wget curl git python vim \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN add-apt-repository ppa:bitcoin/bitcoin \
&& apt update \
&& apt install -y --no-install-recommends \
build-essential libtool autotools-dev bsdmainutils \
libevent-dev autoconf automake pkg-config libssl-dev \
libdb4.8-dev libdb4.8++-dev \
librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick \
libcap-dev libz-dev libbz2-dev python-setuptools \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install llvm
RUN apt update \
&& apt install -y --no-install-recommends \
llvm \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV PROJECTDIR=/opt/scalaris-project/scalaris
ENV BASEPREFIX=$PROJECTDIR/depends
ENV DISTDIR=/opt/scalaris-project/dist
ENV HOST=x86_64-apple-darwin14
# Download depends
RUN mkdir -p $PROJECTDIR \
&& cd $PROJECTDIR \
&& wget -nv https://s3.us-east-2.amazonaws.com/devbuilds.blocknetprotocol.com/depends/depends-v4.2.0-mac-bionic.tar.gz \
&& [ "$(printf 'f1c92dbbcc4f2e05e5965a7031993e8e0f6e38fee987f30e98ae9a65c7d255b9 depends-v4.2.0-mac-bionic.tar.gz' | sha256sum -c)" = "depends-v4.2.0-mac-bionic.tar.gz: OK" ] || $(echo "depends checksum failed"; exit 1)
# Copy source files
COPY . $PROJECTDIR/
# Build source
RUN mkdir -p $DISTDIR \
&& cd $PROJECTDIR \
&& rm -r $BASEPREFIX \
&& tar xzf depends-v4.2.0-mac-bionic.tar.gz \
&& chmod +x ./autogen.sh; sync \
&& ./autogen.sh \
&& CONFIG_SITE=$BASEPREFIX/$HOST/share/config.site ./configure CFLAGS="-g3 -O0" CXXFLAGS="-g3 -O0" --with-gui=qt5 --enable-debug --prefix=/ \
&& make clean \
&& echo "Building with cores: $ecores" \
&& make -j$ecores \
&& mkdir -p $DISTDIR/bin && llvm-dsymutil-6.0 src/qt/scalaris-qt -o $DISTDIR/bin/scalaris-qt.dSYM \
&& make install DESTDIR=$DISTDIR \
&& make clean
WORKDIR /opt/scalaris-project/dist
# Port, RPC, Test Port, Test RPC
EXPOSE 42500 42510 41474 41419