This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
demo-gui.dockerfile
106 lines (91 loc) · 4.12 KB
/
demo-gui.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
from ubuntu:18.04 as builder
workdir /root
run apt-get update && apt-get install -y wget gnupg
run wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
run echo '\n\
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic main\n\
deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main\n\
deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main\n' >>/etc/apt/sources.list
run apt-get update && apt-get install -y \
autoconf2.13 \
build-essential \
bzip2 \
cargo \
clang-8 \
git \
libgmp-dev \
libpq-dev \
lld-8 \
lldb-8 \
ninja-build \
nodejs \
npm \
pkg-config \
postgresql-server-dev-all \
python2.7-dev \
python3-dev \
rustc \
zlib1g-dev
run update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100
run update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 100
workdir /root
run wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz
run tar xf boost_1_70_0.tar.gz
workdir /root/boost_1_70_0
run ./bootstrap.sh
run ./b2 toolset=clang -j10 install
workdir /root
run wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5.tar.gz
run tar xf cmake-3.14.5.tar.gz
workdir /root/cmake-3.14.5
run ./bootstrap --parallel=10
run make -j10
run make -j10 install
workdir /root
run wget https://github.com/EOSIO/eos/releases/download/v1.8.1/eosio_1.8.1-1-ubuntu-18.04_amd64.deb
run apt-get install -y ./eosio_1.8.1-1-ubuntu-18.04_amd64.deb
workdir /root
run wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.6.2/eosio.cdt_1.6.2-1-ubuntu-18.04_amd64.deb
run apt-get install -y ./eosio.cdt_1.6.2-1-ubuntu-18.04_amd64.deb
workdir /root
run mkdir /root/history-tools
copy cmake /root/history-tools/cmake
copy CMakeLists.txt /root/history-tools
copy external /root/history-tools/external
copy libraries /root/history-tools/libraries
copy src /root/history-tools/src
copy wasms /root/history-tools/wasms
run mkdir /root/history-tools/build
workdir /root/history-tools/build
run cmake -GNinja -DSKIP_SUBMODULE_CHECK=1 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_C_COMPILER=clang-8 ..
run bash -c "cd ../src && npm install node-fetch"
run ninja
copy demo-gui /root/history-tools/demo-gui
workdir /root/history-tools/demo-gui
run npm i && npm run build
# Final image
from ubuntu:18.04
run apt-get update && apt-get install -y libssl1.0.0 libatomic1
run rm -rf /root/.local/share/eosio/
workdir /root
run mkdir history-tools
workdir /root/history-tools
run mkdir build
run mkdir src
run mkdir -p demo-gui/dist
workdir /root/history-tools/build
copy --from=builder /root/history-tools/src/query-config.json /root/history-tools/src/
copy --from=builder /root/history-tools/build/combo-rocksdb /root/history-tools/build/
copy --from=builder /root/history-tools/build/fill-rocksdb /root/history-tools/build/
copy --from=builder /root/history-tools/build/wasm-ql-rocksdb /root/history-tools/build/
copy --from=builder /root/history-tools/build/chain-server.wasm /root/history-tools/build/
copy --from=builder /root/history-tools/build/legacy-server.wasm /root/history-tools/build/
copy --from=builder /root/history-tools/build/token-server.wasm /root/history-tools/build/
copy --from=builder /root/history-tools/demo-gui/dist/chain-client.wasm /root/history-tools/demo-gui/dist/
copy --from=builder /root/history-tools/demo-gui/dist/client.bundle.js /root/history-tools/demo-gui/dist/
copy --from=builder /root/history-tools/demo-gui/dist/index.html /root/history-tools/demo-gui/dist/
copy --from=builder /root/history-tools/demo-gui/dist/token-client.wasm /root/history-tools/demo-gui/dist/
workdir /root/history-tools/build
expose 80/tcp
entrypoint ["./combo-rocksdb", "--wql-static-dir", "../demo-gui/dist/", "--wql-listen", "0.0.0.0:80"]