├── .env.example ├── .gitattributes ├── .gitignore ├── README.md ├── config-dir ├── config.ini └── genesis.json ├── docker-compose.yml └── eos ├── Dockerfile ├── libs ├── binaryen-1.37.36.tar.gz ├── boost_1_66_0.tar.bz2 ├── cmake-3.9.6-Linux-x86_64.sh ├── llvm.zip ├── mongo-c-driver-1.9.3.tar.gz ├── mongo-cxx-driver-r3.2.0.tar.gz └── secp256k1-zkp.zip ├── nodeos.sh └── sources.list /.env.example: -------------------------------------------------------------------------------- 1 | HTTP_PORT=8888 2 | NODE_PORT=9876 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | eos/libs/* filter=lfs diff=lfs merge=lfs -text 2 | eos/*.tar.gz filter=lfs diff=lfs merge=lfs -text 3 | eos/*.zip filter=lfs diff=lfs merge=lfs -text 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | .idea/ 4 | .env 5 | data-dir/* 6 | contracts/* 7 | 8 | *.json 9 | *.info -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ~~eos-dawn3.x docker配置~~ 2 | > **This resposity is deprecated, please switch to the new [resposity](https://github.com/EOSMore/EOSDocker)** 3 | -------------------------------------------------------------------------------- /config-dir/config.ini: -------------------------------------------------------------------------------- 1 | # Track only transactions whose scopes involve the listed accounts. Default is to track all transactions. 2 | # filter_on_accounts = 3 | 4 | # Limits the maximum time (in milliseconds) processing a single get_transactions call. 5 | get-transactions-time-limit = 3 6 | 7 | # File to read Genesis State from 8 | genesis-json = /opt/eosio/bin/config-dir/genesis.json 9 | 10 | # override the initial timestamp in the Genesis State file 11 | # genesis-timestamp = 12 | 13 | # the location of the block log (absolute path or relative to application data dir) 14 | block-log-dir = "blocks" 15 | 16 | # Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. 17 | # checkpoint = 18 | 19 | # the location of the chain shared memory files (absolute path or relative to application data dir) 20 | shared-file-dir = "blockchain" 21 | 22 | # Minimum size MB of database shared memory file 23 | shared-file-size = 8192 24 | 25 | # The local IP and port to listen for incoming http connections. 26 | http-server-address = 0.0.0.0:8888 27 | 28 | # Specify the Access-Control-Allow-Origin to be returned on each request. 29 | access-control-allow-origin = * 30 | 31 | # Specify the Access-Control-Allow-Headers to be returned on each request. 32 | # access-control-allow-headers = 33 | 34 | # Specify if Access-Control-Allow-Credentials: true should be returned on each request. 35 | access-control-allow-credentials = false 36 | 37 | # The actual host:port used to listen for incoming p2p connections. 38 | p2p-listen-endpoint = 0.0.0.0:9876 39 | 40 | # An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. 41 | # p2p-server-address = 42 | 43 | # The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. 44 | # p2p-peer-address = 45 | 46 | # The name supplied to identify this node amongst the peers. 47 | agent-name = "EOS Test Agent" 48 | 49 | # True to always send full blocks, false to send block summaries 50 | send-whole-blocks = 1 51 | 52 | # Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. 53 | allowed-connection = any 54 | 55 | # Optional public key of peer allowed to connect. May be used multiple times. 56 | # peer-key = 57 | 58 | # Tuple of [PublicKey, WIF private key] (may specify multiple times) 59 | # peer-private-key = 60 | # Log level: one of 'all', 'debug', 'info', 'warn', 'error', or 'off' 61 | log-level-net-plugin = info 62 | 63 | # Maximum number of clients from which connections are accepted, use 0 for no limit 64 | max-clients = 25 65 | 66 | # number of seconds to wait before cleaning up dead connections 67 | connection-cleanup-period = 30 68 | 69 | # True to require exact match of peer network version. 70 | network-version-match = 0 71 | 72 | # Enable block production, even if the chain is stale. 73 | enable-stale-production = true 74 | 75 | # Percent of producers (0-100) that must be participating in order to produce blocks 76 | required-participation = 33 77 | 78 | # ID of producer controlled by this node (e.g. inita; may specify multiple times) 79 | # producer-name = 80 | 81 | # Tuple of [public key, WIF private key] (may specify multiple times) 82 | private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"] 83 | 84 | # Plugin(s) to enable, may be specified multiple times 85 | # plugin = 86 | # Plugin(s) to enable, may be specified multiple times 87 | plugin = eosio::producer_plugin 88 | plugin = eosio::chain_api_plugin 89 | plugin = eosio::wallet_api_plugin 90 | plugin = eosio::account_history_api_plugin 91 | plugin = eosio::http_plugin 92 | # plugin = eosio::mongo_db_plugin 93 | 94 | # Enable block production with the testnet producers 95 | producer-name = eosio -------------------------------------------------------------------------------- /config-dir/genesis.json: -------------------------------------------------------------------------------- 1 | { 2 | "initial_key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", 3 | "initial_timestamp": "2017-03-30T12:00:00", 4 | "initial_parameters": { 5 | "maintenance_interval": 86400, 6 | "maintenance_skip_slots": 3, 7 | "maximum_transaction_size": 2048, 8 | "maximum_block_size": 2048000000, 9 | "maximum_time_until_expiration": 86400, 10 | "maximum_producer_count": 1001 11 | }, 12 | "immutable_parameters": { 13 | "min_producer_count": 21 14 | }, 15 | "initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000" 16 | } -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | eos: 5 | build: 6 | context: ./eos 7 | image: eosio/eos 8 | command: /opt/eosio/bin/nodeos.sh 9 | ports: 10 | - ${HTTP_PORT}:8888 11 | - ${NODE_PORT}:9876 12 | expose: 13 | - "8888" 14 | volumes: 15 | - ./data-dir:/opt/eosio/bin/data-dir 16 | - ./config-dir:/opt/eosio/bin/config-dir 17 | - ./contracts:/opt/eosio/bin/contracts 18 | 19 | walletd: 20 | image: eosio/eos 21 | command: /opt/eosio/bin/keosd 22 | links: 23 | - eos 24 | volumes: 25 | - ./data-dir:/opt/eosio/bin/data-dir 26 | - ./config-dir:/opt/eosio/bin/config-dir 27 | - ./contracts:/opt/eosio/bin/contracts -------------------------------------------------------------------------------- /eos/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 as builder 2 | 3 | COPY sources.list /etc/apt/sources.list 4 | 5 | RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ 6 | && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \ 7 | && apt-get update \ 8 | && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget curl net-tools ca-certificates unzip doxygen graphviz 9 | 10 | RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main" >> /etc/apt/sources.list.d/llvm.list \ 11 | && wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - \ 12 | && apt-get update \ 13 | && DEBIAN_FRONTEND=noninteractive apt-get install -y git-core automake autoconf libtool build-essential pkg-config libtool \ 14 | mpi-default-dev libicu-dev python-dev python3-dev libbz2-dev zlib1g-dev libssl-dev libgmp-dev \ 15 | clang-4.0 lldb-4.0 lld-4.0 llvm-4.0-dev libclang-4.0-dev ninja-build \ 16 | && rm -rf /var/lib/apt/lists/* 17 | 18 | RUN update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-4.0/bin/clang 400 \ 19 | && update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-4.0/bin/clang++ 400 20 | 21 | COPY libs/cmake-3.9.6-Linux-x86_64.sh cmake-3.9.6-Linux-x86_64.sh 22 | RUN bash cmake-3.9.6-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license \ 23 | && rm cmake-3.9.6-Linux-x86_64.sh 24 | 25 | ENV CC clang 26 | ENV CXX clang++ 27 | 28 | COPY libs/ ./ 29 | 30 | RUN tar -xjf boost_1_66_0.tar.bz2 \ 31 | && cd boost_1_66_0 \ 32 | && ./bootstrap.sh --prefix=/usr/local \ 33 | && echo 'using clang : 4.0 : clang++-4.0 ;' >> project-config.jam \ 34 | && ./b2 -d0 -j$(nproc) --with-thread --with-date_time --with-system --with-filesystem --with-program_options \ 35 | --with-signals --with-serialization --with-chrono --with-test --with-context --with-locale --with-coroutine --with-iostreams toolset=clang link=static install \ 36 | && cd .. && rm -rf boost_1_66_0 37 | 38 | RUN unzip llvm.zip \ 39 | && cd llvm \ 40 | && cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/opt/wasm -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release \ 41 | && cmake --build build --target install \ 42 | && cd .. && rm -rf llvm 43 | 44 | RUN unzip secp256k1-zkp.zip \ 45 | && cd secp256k1-zkp \ 46 | && ./autogen.sh \ 47 | && ./configure --prefix=/usr/local \ 48 | && make -j$(nproc) install \ 49 | && cd .. && rm -rf secp256k1-zkp 50 | 51 | RUN tar -xzf mongo-c-driver-1.9.3.tar.gz \ 52 | && cd mongo-c-driver-1.9.3 \ 53 | && ./configure --disable-automatic-init-and-cleanup --prefix=/usr/local \ 54 | && make -j$(nproc) install \ 55 | && cd .. && rm -rf mongo-c-driver-1.9.3 56 | 57 | RUN tar -xzf mongo-cxx-driver-r3.2.0.tar.gz \ 58 | && cd mongo-cxx-driver-r3.2.0 \ 59 | && cmake -H. -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local\ 60 | && cmake --build build --target install 61 | 62 | RUN git clone -b dawn-v3.0.0 --depth 1 https://github.com/EOSIO/eos.git --recursive \ 63 | && cd eos \ 64 | && cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \ 65 | -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DSecp256k1_ROOT_DIR=/usr/local \ 66 | && cmake --build /tmp/build --target install 67 | RUN mkdir -p /opt/eosio/ \ 68 | && cp -r /tmp/build/share /opt/eosio/share \ 69 | && cp -r /tmp/build/bin /opt/eosio/bin \ 70 | && cp -r /tmp/build/contracts /contracts \ 71 | && rm -rf /tmp/build && rm -rf /eos 72 | 73 | FROM ubuntu:16.04 74 | 75 | COPY sources.list /etc/apt/sources.list 76 | 77 | RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl && rm -rf /var/lib/apt/lists/* 78 | COPY --from=builder /usr/local/lib/* /usr/local/lib/ 79 | COPY --from=builder /opt/eosio /opt/eosio 80 | COPY --from=builder /contracts /contracts 81 | COPY nodeos.sh /opt/eosio/bin/nodeos.sh 82 | ENV EOSIO_ROOT=/opt/eosio 83 | RUN chmod +x /opt/eosio/bin/nodeos.sh 84 | RUN sed -i.bak 's/-I $filePath/-I $filePath -I $filePath\/../g' /opt/eosio/bin/eosiocpp 85 | ENV LD_LIBRARY_PATH /usr/local/lib 86 | VOLUME /opt/eosio/bin/data-dir 87 | VOLUME /opt/eosio/bin/config-dir 88 | VOLUME /opt/eosio/bin/contracts 89 | ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 90 | WORKDIR /opt/eosio/bin -------------------------------------------------------------------------------- /eos/libs/binaryen-1.37.36.tar.gz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e77520b31e81befe7767f7179243983d678cda6d22cb07110a92aa2ff38831f7 3 | size 4598433 4 | -------------------------------------------------------------------------------- /eos/libs/boost_1_66_0.tar.bz2: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9 3 | size 85995778 4 | -------------------------------------------------------------------------------- /eos/libs/cmake-3.9.6-Linux-x86_64.sh: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:57cd1dc4857e4d3689d006faf6ff56d5e3635c64d456e34596476db5e9ba8031 3 | size 32488610 4 | -------------------------------------------------------------------------------- /eos/libs/llvm.zip: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:48c93cf167d87827c45ebddcec99f27213625a6d749bef4c8c8f63301d79a154 3 | size 61982744 4 | -------------------------------------------------------------------------------- /eos/libs/mongo-c-driver-1.9.3.tar.gz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c2c94ef63aaa09efabcbadc4ac3c8740faa102266bdd2559d550f1955b824398 3 | size 7716783 4 | -------------------------------------------------------------------------------- /eos/libs/mongo-cxx-driver-r3.2.0.tar.gz: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e26edd44cf20bd6be91907403b6d63a065ce95df4c61565770147a46716aad8c 3 | size 345294 4 | -------------------------------------------------------------------------------- /eos/libs/secp256k1-zkp.zip: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fac6b6ebc705c84191904a156a674542c6badfc6e35af8efb35129721ac1c334 3 | size 127726 4 | -------------------------------------------------------------------------------- /eos/nodeos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd /opt/eosio/bin 3 | 4 | if [ "`ls -A /opt/eosio/bin/contracts`" = "" ]; then 5 | cp -r /contracts /opt/eosio/bin 6 | fi 7 | 8 | DATA_DIR=/opt/eosio/bin/data-dir 9 | CONFIG_DIR=/opt/eosio/bin/config-dir 10 | 11 | exec /opt/eosio/bin/nodeos --data-dir $DATA_DIR --config-dir $CONFIG_DIR > $DATA_DIR/stderr.txt 2> $DATA_DIR/stdout.txt $@ -------------------------------------------------------------------------------- /eos/sources.list: -------------------------------------------------------------------------------- 1 | # deb cdrom:[Ubuntu 16.04.4 LTS _Xenial Xerus_ - Release amd64 (20180228)]/ xenial main restricted 2 | 3 | # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to 4 | # newer versions of the distribution. 5 | deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted 6 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted 7 | 8 | ## Major bug fix updates produced after the final release of the 9 | ## distribution. 10 | deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted 11 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted 12 | 13 | ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 14 | ## team. Also, please note that software in universe WILL NOT receive any 15 | ## review or updates from the Ubuntu security team. 16 | deb http://mirrors.aliyun.com/ubuntu/ xenial universe 17 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe 18 | deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe 19 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe 20 | 21 | ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 22 | ## team, and may not be under a free licence. Please satisfy yourself as to 23 | ## your rights to use the software. Also, please note that software in 24 | ## multiverse WILL NOT receive any review or updates from the Ubuntu 25 | ## security team. 26 | deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse 27 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse 28 | deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse 29 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse 30 | 31 | ## N.B. software from this repository may not have been tested as 32 | ## extensively as that contained in the main release, although it includes 33 | ## newer versions of some applications which may provide useful features. 34 | ## Also, please note that software in backports WILL NOT receive any review 35 | ## or updates from the Ubuntu security team. 36 | deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 37 | # deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 38 | 39 | ## Uncomment the following two lines to add software from Canonical's 40 | ## 'partner' repository. 41 | ## This software is not part of Ubuntu, but is offered by Canonical and the 42 | ## respective vendors as a service to Ubuntu users. 43 | # deb http://archive.canonical.com/ubuntu xenial partner 44 | # deb-src http://archive.canonical.com/ubuntu xenial partner 45 | 46 | deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted 47 | # deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted 48 | deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe 49 | # deb-src http://security.ubuntu.com/ubuntu xenial-security universe 50 | deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse 51 | # deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse --------------------------------------------------------------------------------