-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
26 lines (22 loc) · 1.33 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
FROM boscore/builder:v2.0.4 as builder
ARG branch=master
ARG symbol=EOS
ENV OPENSSL_ROOT_DIR /usr/include/openssl
RUN git clone -b $branch https://github.com/boscore/bos.git --recursive \
&& cd bos && sed -i '/add_subdirectory(tools)/c\#add_subdirectory(tools).' libraries/eos-vm/CMakeLists.txt \
&& echo "$branch:$(git rev-parse HEAD)" > /etc/boscore-version \
&& cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \
-DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \
&& cmake --build /tmp/build --target install
FROM ubuntu:18.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates iproute2 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/* /usr/local/lib/
COPY --from=builder /tmp/build/bin /opt/eosio/bin
COPY --from=builder /bos/Docker/config.ini /
COPY --from=builder /etc/boscore-version /etc
COPY --from=builder /bos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh
ENV EOSIO_ROOT=/opt/eosio
RUN chmod +x /opt/eosio/bin/nodeosd.sh
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin