-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (26 loc) · 1.09 KB
/
Dockerfile
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
FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
ARG SERVER_VERSION=v0.10.0.3
ARG SERVER_URL=https://github.com/nemtech/catapult-server.git
ENV TZ=America/New_York
RUN apt update -y
RUN apt install -y tzdata
RUN apt install python3-pip git cmake ninja-build -y
WORKDIR /home
RUN pip3 install conan
RUN git clone ${SERVER_URL} --single-branch --branch ${SERVER_VERSION} server
RUN cd server
RUN mkdir _build
RUN cd _build
RUN conan remote add nemtech https://api.bintray.com/conan/nemtech/symbol-server-dependencies
RUN apt install -y gcc-9 g++-9
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9
RUN conan install /home/server --build missing
RUN cmake -DUSE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -G Ninja -DENABLE_TESTS=OFF /home/server
RUN ninja publish && ninja -j4
RUN mkdir -p /usr/catapult/bin /usr/catapult/lib /usr/catapult/deps
RUN cp -r bin/* /usr/catapult/bin
RUN cp -r lib/* /usr/catapult/lib
RUN cp -r deps/* /usr/catapult/deps