-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile-minimal-sampler
53 lines (46 loc) · 1.44 KB
/
Dockerfile-minimal-sampler
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
FROM ubuntu:20.04
# install required software
RUN apt-get update --fix-missing && DEBIAN_FRONTEND=noninteractive apt-get install -y curl \
git \
dnsutils \
net-tools \
build-essential \
cmake \
git \
libcurl4-openssl-dev \
libgmp-dev \
llvm-11-dev \
python3-numpy \
file \
zlib1g-dev \
g++-10
# setup folder structure
RUN mkdir /eosio
RUN mkdir /eosio/build
RUN mkdir /eosio/downloads
# setup build time variables
ARG NODEOS_REPOSITORY
ENV NODEOS_REPOSITORY $NODEOS_REPOSITORY
ARG NODEOS_VERSION
ENV NODEOS_VERSION $NODEOS_VERSION
# build nodeos
WORKDIR /eosio/build
RUN git clone -b $NODEOS_VERSION $NODEOS_REPOSITORY /eosio/build
RUN git submodule update --init --recursive
RUN mkdir -p build
WORKDIR /eosio/build/build
RUN cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-11 ..
RUN make -j "$(nproc)" nodeos
RUN cp /eosio/build/build/programs/nodeos/nodeos /eosio/nodeos
RUN rm -rf /eosio/build/build
# configure nodeos
COPY configs/config.ini /eosio/base.ini
# copy startup script
COPY scripts/entrypoint-minimal-sampler.sh /eosio/entrypoint.sh
RUN chmod +x /eosio/entrypoint.sh
# copy example logging, and potentially overwrite with a logging.json in the configs directory
COPY configs/nodeos/default-logging.json /eosio/logging.json
COPY README.md configs/*logging.json /eosio/
# start nodeos
WORKDIR /eosio
CMD ["/eosio/entrypoint.sh"]