diff --git a/Docker/Dockerfile b/Docker/Dockerfile deleted file mode 100644 index 74da4edf1ec..00000000000 --- a/Docker/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM eosio/builder as builder -ARG branch=master -ARG symbol=SYS - -RUN git clone -b $branch https://github.com/EOSIO/eos.git --recursive \ - && cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-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 \ - && cmake --build /tmp/build --target install - - -FROM ubuntu:18.04 - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates libusb-1.0 libcurl3-gnutls && 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 /eos/Docker/config.ini / -COPY --from=builder /etc/eosio-version /etc -COPY --from=builder /eos/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 diff --git a/Docker/README.md b/Docker/README.md deleted file mode 100644 index 6eade280f9b..00000000000 --- a/Docker/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# Run in docker - -Simple and fast setup of EOS.IO on Docker is also available. - -## Install Dependencies - -- [Docker](https://docs.docker.com) Docker 17.05 or higher is required -- [docker-compose](https://docs.docker.com/compose/) version >= 1.10.0 - -## Docker Requirement - -- At least 7GB RAM (Docker -> Preferences -> Advanced -> Memory -> 7GB or above) -- If the build below fails, make sure you've adjusted Docker Memory settings and try again. - -## Build eos image - -```bash -git clone https://github.com/EOSIO/eos.git --recursive --depth 1 -cd eos/Docker -docker build . -t eosio/eos -``` - -The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.7.0-rc1 tag, you could do the following: - -```bash -docker build -t eosio/eos:v1.7.0-rc1 --build-arg branch=v1.7.0-rc1 . -``` - -By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image. - -```bash -docker build -t eosio/eos --build-arg symbol= . -``` - -## Start nodeos docker container only - -```bash -docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 arg1 arg2 -``` - -By default, all data is persisted in a docker volume. It can be deleted if the data is outdated or corrupted: - -```bash -$ docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' nodeos -fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc -$ docker volume rm fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc -``` - -Alternately, you can directly mount host directory into the container - -```bash -docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh -e --http-alias=nodeos:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 arg1 arg2 -``` - -## Get chain info - -```bash -curl http://127.0.0.1:8888/v1/chain/get_info -``` - -## Start both nodeos and keosd containers - -```bash -docker volume create --name=nodeos-data-volume -docker volume create --name=keosd-data-volume -docker-compose up -d -``` - -After `docker-compose up -d`, two services named `nodeosd` and `keosd` will be started. nodeos service would expose ports 8888 and 9876 to the host. keosd service does not expose any port to the host, it is only accessible to cleos when running cleos is running inside the keosd container as described in "Execute cleos commands" section. - -### Execute cleos commands - -You can run the `cleos` commands via a bash alias. - -```bash -alias cleos='docker-compose exec keosd /opt/eosio/bin/cleos -u http://nodeosd:8888 --wallet-url http://localhost:8900' -cleos get info -cleos get account inita -``` - -Upload sample exchange contract - -```bash -cleos set contract exchange contracts/exchange/ -``` - -If you don't need keosd afterwards, you can stop the keosd service using - -```bash -docker-compose stop keosd -``` - -### Develop/Build custom contracts - -Due to the fact that the eosio/eos image does not contain the required dependencies for contract development (this is by design, to keep the image size small), you will need to utilize the eosio/eos-dev image. This image contains both the required binaries and dependencies to build contracts using eosiocpp. - -You can either use the image available on [Docker Hub](https://hub.docker.com/r/eosio/eos-dev/) or navigate into the dev folder and build the image manually. - -```bash -cd dev -docker build -t eosio/eos-dev . -``` - -### Change default configuration - -You can use docker compose override file to change the default configurations. For example, create an alternate config file `config2.ini` and a `docker-compose.override.yml` with the following content. - -```yaml -version: "2" - -services: - nodeos: - volumes: - - nodeos-data-volume:/opt/eosio/bin/data-dir - - ./config2.ini:/opt/eosio/bin/data-dir/config.ini -``` - -Then restart your docker containers as follows: - -```bash -docker-compose down -docker-compose up -``` - -### Clear data-dir - -The data volume created by docker-compose can be deleted as follows: - -```bash -docker volume rm nodeos-data-volume -docker volume rm keosd-data-volume -``` - -### Docker Hub - -Docker Hub images are now deprecated. New build images were discontinued on January 1st, 2019. The existing old images will be removed on June 1st, 2019. - -### EOSIO Testnet - -We can easily set up a EOSIO local testnet using docker images. Just run the following commands: - -Note: if you want to use the mongo db plugin, you have to enable it in your `data-dir/config.ini` first. - -``` -# create volume -docker volume create --name=nodeos-data-volume -docker volume create --name=keosd-data-volume -# pull images and start containers -docker-compose -f docker-compose-eosio-latest.yaml up -d -# get chain info -curl http://127.0.0.1:8888/v1/chain/get_info -# get logs -docker-compose logs -f nodeosd -# stop containers -docker-compose -f docker-compose-eosio-latest.yaml down -``` - -The `blocks` data are stored under `--data-dir` by default, and the wallet files are stored under `--wallet-dir` by default, of course you can change these as you want. - -### About MongoDB Plugin - -Currently, the mongodb plugin is disabled in `config.ini` by default, you have to change it manually in `config.ini` or you can mount a `config.ini` file to `/opt/eosio/bin/data-dir/config.ini` in the docker-compose file. diff --git a/Docker/builder/Dockerfile b/Docker/builder/Dockerfile deleted file mode 100644 index 11493039a10..00000000000 --- a/Docker/builder/Dockerfile +++ /dev/null @@ -1,58 +0,0 @@ -FROM ubuntu:18.04 - -LABEL author="xiaobo " maintainer="Xiaobo Huang-Ming Huang " version="0.1.1" \ - description="This is a base image for building eosio/eos" - -RUN echo 'APT::Install-Recommends 0;' >> /etc/apt/apt.conf.d/01norecommends \ - && echo 'APT::Install-Suggests 0;' >> /etc/apt/apt.conf.d/01norecommends \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget curl net-tools ca-certificates unzip gnupg - -RUN echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main" >> /etc/apt/sources.list.d/llvm.list \ - && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y git-core automake autoconf libtool build-essential pkg-config libtool \ - mpi-default-dev libicu-dev python-dev python3-dev libbz2-dev zlib1g-dev libssl-dev libgmp-dev \ - clang-4.0 lldb-4.0 lld-4.0 llvm-4.0-dev libclang-4.0-dev ninja-build libusb-1.0-0-dev libcurl4-gnutls-dev pkg-config \ - && rm -rf /var/lib/apt/lists/* - -RUN update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-4.0/bin/clang 400 \ - && update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-4.0/bin/clang++ 400 - -RUN wget https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.sh \ - && bash cmake-3.9.6-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license \ - && rm cmake-3.9.6-Linux-x86_64.sh - -ENV CC clang -ENV CXX clang++ - -RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2 -O - | tar -xj \ - && cd boost_1_67_0 \ - && ./bootstrap.sh --prefix=/usr/local \ - && echo 'using clang : 4.0 : clang++-4.0 ;' >> project-config.jam \ - && ./b2 -d0 -j$(nproc) --with-thread --with-date_time --with-system --with-filesystem --with-program_options \ - --with-signals --with-serialization --with-chrono --with-test --with-context --with-locale --with-coroutine --with-iostreams toolset=clang link=static install \ - && cd .. && rm -rf boost_1_67_0 - -RUN wget https://github.com/mongodb/mongo-c-driver/releases/download/1.10.2/mongo-c-driver-1.10.2.tar.gz -O - | tar -xz \ - && cd mongo-c-driver-1.10.2 \ - && mkdir cmake-build && cd cmake-build \ - && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BSON=ON \ - -DENABLE_SSL=OPENSSL -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_STATIC=ON .. \ - && make -j$(nproc) \ - && make install \ - && cd ../../ && rm -rf mongo-c-driver-1.10.2 - -RUN git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git \ - && git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git llvm/tools/clang \ - && cd llvm \ - && cmake -H. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/opt/wasm -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release \ - && cmake --build build --target install \ - && cd .. && rm -rf llvm - -RUN git clone --depth 1 -b releases/v3.3 https://github.com/mongodb/mongo-cxx-driver \ - && cd mongo-cxx-driver/build \ - && cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. \ - && make -j$(nproc) \ - && make install \ - && cd ../../ && rm -rf mongo-cxx-driver diff --git a/Docker/cleos.sh b/Docker/cleos.sh deleted file mode 100755 index 36246d27545..00000000000 --- a/Docker/cleos.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Usage: -# Go into cmd loop: sudo ./cleos.sh -# Run single cmd: sudo ./cleos.sh - -PREFIX="docker-compose exec nodeosd cleos" -if [ -z $1 ] ; then - while : - do - read -e -p "cleos " cmd - history -s "$cmd" - $PREFIX $cmd - done -else - $PREFIX "$@" -fi diff --git a/Docker/config.ini b/Docker/config.ini deleted file mode 100644 index a85918d236b..00000000000 --- a/Docker/config.ini +++ /dev/null @@ -1,145 +0,0 @@ -# the location of the blocks directory (absolute path or relative to application data dir) (eosio::chain_plugin) -blocks-dir = "blocks" - -# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. (eosio::chain_plugin) -# checkpoint = - -# Override default WASM runtime (eosio::chain_plugin) -# wasm-runtime = - -# Maximum size (in MB) of the chain state database (eosio::chain_plugin) -chain-state-db-size-mb = 8192 - -# Maximum size (in MB) of the reversible blocks database (eosio::chain_plugin) -reversible-blocks-db-size-mb = 340 - -# print contract's output to console (eosio::chain_plugin) -contracts-console = false - -# Account added to actor whitelist (may specify multiple times) (eosio::chain_plugin) -# actor-whitelist = - -# Account added to actor blacklist (may specify multiple times) (eosio::chain_plugin) -# actor-blacklist = - -# Contract account added to contract whitelist (may specify multiple times) (eosio::chain_plugin) -# contract-whitelist = - -# Contract account added to contract blacklist (may specify multiple times) (eosio::chain_plugin) -# contract-blacklist = - -# Track actions which match receiver:action:actor. Actor may be blank to include all. Receiver and Action may not be blank. (eosio::history_plugin) -# filter-on = - -# PEM encoded trusted root certificate (or path to file containing one) used to validate any TLS connections made. (may specify multiple times) -# (eosio::http_client_plugin) -# https-client-root-cert = - -# true: validate that the peer certificates are valid and trusted, false: ignore cert errors (eosio::http_client_plugin) -https-client-validate-peers = 1 - -# The local IP and port to listen for incoming http connections; set blank to disable. (eosio::http_plugin) -http-server-address = 0.0.0.0:8888 - -# The local IP and port to listen for incoming https connections; leave blank to disable. (eosio::http_plugin) -# https-server-address = - -# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) -# https-certificate-chain-file = - -# Filename with https private key in PEM format. Required for https (eosio::http_plugin) -# https-private-key-file = - -# Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin) -# access-control-allow-origin = - -# Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin) -# access-control-allow-headers = - -# Specify the Access-Control-Max-Age to be returned on each request. (eosio::http_plugin) -# access-control-max-age = - -# Specify if Access-Control-Allow-Credentials: true should be returned on each request. (eosio::http_plugin) -access-control-allow-credentials = false - -# The actual host:port used to listen for incoming p2p connections. (eosio::net_plugin) -p2p-listen-endpoint = 0.0.0.0:9876 - -# An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. (eosio::net_plugin) -# p2p-server-address = - -# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin) -# p2p-peer-address = - -# Maximum number of client0nodes from any single IP address (eosio::net_plugin) -p2p-max-nodes-per-host = 1 - -# The name supplied to identify this node amongst the peers. (eosio::net_plugin) -agent-name = "EOS Test Agent" - -# 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. (eosio::net_plugin) -allowed-connection = any - -# Optional public key of peer allowed to connect. May be used multiple times. (eosio::net_plugin) -# peer-key = - -# Tuple of [PublicKey, WIF private key] (may specify multiple times) (eosio::net_plugin) -# peer-private-key = - -# Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin) -max-clients = 25 - -# number of seconds to wait before cleaning up dead connections (eosio::net_plugin) -connection-cleanup-period = 30 - -# True to require exact match of peer network version. (eosio::net_plugin) -network-version-match = 0 - -# number of blocks to retrieve in a chunk from any individual peer during synchronization (eosio::net_plugin) -sync-fetch-span = 100 - -# Enable block production, even if the chain is stale. (eosio::producer_plugin) -enable-stale-production = false - -# Start this node in a state where production is paused (eosio::producer_plugin) -pause-on-startup = false - -# Limits the maximum time (in milliseconds) that is allowed a pushed transaction's code to execute before being considered invalid (eosio::producer_plugin) -max-transaction-time = 30 - -# Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain this node will produce blocks on (use negative value to indicate unlimited) (eosio::producer_plugin) -max-irreversible-block-age = -1 - -# ID of producer controlled by this node (e.g. inita; may specify multiple times) (eosio::producer_plugin) -# producer-name = -producer-name = eosio - -# (DEPRECATED - Use signature-provider instead) Tuple of [public key, WIF private key] (may specify multiple times) (eosio::producer_plugin) -# private-key = - -# Key=Value pairs in the form = -# Where: -# is a string form of a vaild EOSIO public key -# -# is a string in the form : -# -# is KEY, or KEOSD -# -# KEY: is a string form of a valid EOSIO private key which maps to the provided public key -# -# KEOSD: is the URL where keosd is available and the approptiate wallet(s) are unlocked (eosio::producer_plugin) -signature-provider = EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 - -# Limits the maximum time (in milliseconds) that is allowd for sending blocks to a keosd provider for signing (eosio::producer_plugin) -keosd-provider-timeout = 5 - -# Lag in number of blocks from the head block when selecting the reference block for transactions (-1 means Last Irreversible Block) (eosio::txn_test_gen_plugin) -txn-reference-block-lag = 0 - -# eosio key that will be imported automatically when a wallet is created. (eosio::wallet_plugin) -# eosio-key = - -# Plugin(s) to enable, may be specified multiple times -# plugin = -plugin = eosio::chain_api_plugin -plugin = eosio::history_api_plugin diff --git a/Docker/dev/Dockerfile b/Docker/dev/Dockerfile deleted file mode 100644 index f2dea74ac6c..00000000000 --- a/Docker/dev/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM eosio/builder -ARG branch=master -ARG symbol=SYS - -RUN git clone -b $branch https://github.com/EOSIO/eos.git --recursive \ - && cd eos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \ - && cmake -H. -B"/opt/eosio" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/opt/eosio -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \ - && cmake --build /opt/eosio --target install \ - && cp /eos/Docker/config.ini / && ln -s /opt/eosio/contracts /contracts && cp /eos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh && ln -s /eos/tutorials /tutorials - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl ca-certificates vim psmisc python3-pip && rm -rf /var/lib/apt/lists/* -RUN pip3 install numpy -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 diff --git a/Docker/docker-compose-latest.yml b/Docker/docker-compose-latest.yml deleted file mode 100644 index 7384e230cb8..00000000000 --- a/Docker/docker-compose-latest.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: "3" - -services: - nodeosd: - image: eosio/eos:latest - command: /opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 - hostname: nodeosd - ports: - - 8888:8888 - - 9876:9876 - expose: - - "8888" - volumes: - - nodeos-data-volume:/opt/eosio/bin/data-dir - cap_add: - - IPC_LOCK - stop_grace_period: 10m - - keosd: - image: eosio/eos:latest - command: /opt/eosio/bin/keosd --wallet-dir /opt/eosio/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=keosd:8900 --http-alias=localhost:8900 - hostname: keosd - links: - - nodeosd - volumes: - - keosd-data-volume:/opt/eosio/bin/data-dir - stop_grace_period: 10m - -volumes: - nodeos-data-volume: - external: true - keosd-data-volume: - external: true diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml deleted file mode 100755 index a00ffffa4e4..00000000000 --- a/Docker/docker-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: "3" - -services: - builder: - build: - context: builder - image: eosio/builder - - nodeosd: - build: - context: . - image: eosio/eos - command: /opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888 - hostname: nodeosd - ports: - - 8888:8888 - - 9876:9876 - expose: - - "8888" - volumes: - - nodeos-data-volume:/opt/eosio/bin/data-dir - cap_add: - - IPC_LOCK - stop_grace_period: 10m - - keosd: - image: eosio/eos - command: /opt/eosio/bin/keosd --wallet-dir /opt/eosio/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=keosd:8900 --http-alias=localhost:8900 - hostname: keosd - links: - - nodeosd - volumes: - - keosd-data-volume:/opt/eosio/bin/data-dir - stop_grace_period: 10m - -volumes: - nodeos-data-volume: - external: true - keosd-data-volume: - external: true diff --git a/Docker/nodeosd.sh b/Docker/nodeosd.sh deleted file mode 100755 index 870548d6b6b..00000000000 --- a/Docker/nodeosd.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -cd /opt/eosio/bin - -if [ ! -d "/opt/eosio/bin/data-dir" ]; then - mkdir /opt/eosio/bin/data-dir -fi - -if [ -f '/opt/eosio/bin/data-dir/config.ini' ]; then - echo - else - cp /config.ini /opt/eosio/bin/data-dir -fi - -if [ -d '/opt/eosio/bin/data-dir/contracts' ]; then - echo - else - cp -r /contracts /opt/eosio/bin/data-dir -fi - -while :; do - case $1 in - --config-dir=?*) - CONFIG_DIR=${1#*=} - ;; - *) - break - esac - shift -done - -if [ ! "$CONFIG_DIR" ]; then - CONFIG_DIR="--config-dir=/opt/eosio/bin/data-dir" -else - CONFIG_DIR="" -fi - -exec /opt/eosio/bin/nodeos $CONFIG_DIR "$@"