Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
f30ccb00
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f30ccb00
编写于
8月 02, 2017
作者:
peterwillcn
提交者:
Nathan Hourt
8月 08, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adjust standard docker makefile
上级
8b1fbf78
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
27 deletion
+47
-27
Docker/Dockerfile
Docker/Dockerfile
+8
-16
Docker/README.md
Docker/README.md
+11
-0
Docker/config.ini
Docker/config.ini
+8
-7
Docker/entrypoint.sh
Docker/entrypoint.sh
+9
-4
README.md
README.md
+11
-0
未找到文件。
Docker/Dockerfile
浏览文件 @
f30ccb00
FROM
ubuntu
MAINTAINER
xiaobo (peterwillcn@gmail.com)
# Dapao Xie (wzxiejinbin@me.com edit)
MAINTAINER
xiaobo (peterwillcn@gmail.com)
RUN
echo
'APT::Install-Recommends 0;'
>>
/etc/apt/apt.conf.d/01norecommends
\
&&
echo
'APT::Install-Suggests 0;'
>>
/etc/apt/apt.conf.d/01norecommends
\
...
...
@@ -10,7 +10,7 @@ RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main" >> /et
&&
wget
-O
- http://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
\
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
\
&&
rm
-rf
/var/lib/apt/lists/
*
...
...
@@ -20,7 +20,7 @@ RUN update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-4.0/bin/cla
RUN
cd
/tmp
&&
wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh
\
&&
mkdir
/opt/cmake
&&
chmod
+x /tmp/cmake-3.9.0-Linux-x86_64.sh
\
&&
sh /tmp/cmake-3.9.0-Linux-x86_64.sh
--prefix
=
/opt/cmake
--skip-license
\
&&
ln
-s
/opt/cmake/bin/cmake /usr/local/bin
/cmake
&&
ln
-s
/opt/cmake/bin/cmake /usr/local/bin
RUN
cd
/tmp
&&
wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz
\
&&
tar
zxf boost_1_64_0.tar.gz
\
...
...
@@ -40,26 +40,18 @@ RUN cd /tmp && mkdir wasm-compiler && cd wasm-compiler \
&&
cd
llvm/tools
&&
git clone
--depth
1
--single-branch
--branch
release_40 https://github.com/llvm-mirror/clang.git
\
&&
cd
..
&&
mkdir
build
&&
cd
build
\
&&
cmake
-G
"Unix Makefiles"
-DCMAKE_INSTALL_PREFIX
=
/opt/wasm
-DLLVM_TARGETS_TO_BUILD
=
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD
=
WebAssembly
-DCMAKE_BUILD_TYPE
=
Release ../
\
&&
make
-j2
install
&&
rm
-rf
/tmp/wasm-compiler
RUN
cd
/tmp
&&
wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
\
&&
tar
-xvf
gmp-6.1.2.tar.bz2
&&
cd
gmp-6.1.2
\
&&
./configure
&&
make
&&
sudo
make
install
\
&&
make check
\
&&
rm
-rf
/tmp/gmp-6.1.2
RUN
mkdir
-p
/opt/eos/bin/data-dir
&&
make
-j
$(
nproc
)
install
&&
rm
-rf
/tmp/wasm-compiler
RUN
cd
/tmp
&&
git clone https://github.com/EOSIO/eos.git
--recursive
\
&&
cd
eos
&&
mkdir
build
&&
cd
build
\
&&
mkdir
-p
/opt/eos/bin/data-dir
&&
cd
eos
&&
mkdir
build
&&
cd
build
\
&&
WASM_LLVM_CONFIG
=
/opt/wasm/bin/llvm-config cmake
-DCMAKE_CXX_COMPILER
=
clang++
-DCMAKE_C_COMPILER
=
clang
-DCMAKE_INSTALL_PREFIX
=
/opt/eos ../
\
&&
make
-j
2
&&
make
install
\
&&
cp
-a
../contracts /opt/eos/contracts
\
&&
make
-j
$(
nproc
)
&&
make
install
&&
mv
../contracts /
\
&&
ln
-s
/opt/eos/bin/eos
*
/usr/local/bin
\
&&
rm
-rf
/tmp/eos
*
COPY
config.ini genesis.json /
COPY
entrypoint.sh /sbin
RUN
c
d
/opt/eos/bin
&&
c
hmod
+x /sbin/entrypoint.sh
RUN
chmod
+x /sbin/entrypoint.sh
VOLUME
/opt/eos/bin/data-dir
EXPOSE
9876 8888
ENTRYPOINT
["/sbin/entrypoint.sh"]
Docker/README.md
浏览文件 @
f30ccb00
...
...
@@ -21,4 +21,15 @@ sudo mkdir -p /data/store/eos
docker-compose -f docker-compose.yml up
```
Run example contracts
```
cd /data/store/eos/contracts/exchange
docker exec docker_eos_1 eosc setcode exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi
cd /data/store/eos/contracts/currency
docker exec docker_eos_1 eosc setcode currency contracts/currency/currency.wast contracts/currency/currency.abi
```
Done
Docker/config.ini
浏览文件 @
f30ccb00
# File to read Genesis State from
# genesis-json =
genesis-json
=
"/opt/eos/bin/data-dir/genesis.json"
# genesis-json =
genesis-json
=
"/opt/eos/bin/data-dir/genesis.json"
# the location of the block log (absolute path or relative to application data dir)
block-log-dir
=
"blocks"
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.
# checkpoint =
# checkpoint =
# open the database in read only mode
readonly
=
0
...
...
@@ -24,19 +24,19 @@ http-server-endpoint = 127.0.0.1:8888
listen-endpoint
=
127.0.0.1:9876
# The IP address and port of a remote peer to sync with.
# remote-endpoint =
# remote-endpoint =
# The public IP address and port that should be advertized to peers.
public-endpoint
=
0.0.0.0:9876
# Enable block production, even if the chain is stale.
enable-stale-production
=
true
enable-stale-production
=
true
# Percent of producers (0-99) that must be participating in order to produce blocks
required-participation
=
false
# ID of producer controlled by this node (e.g. "inita", quotes are required, may specify multiple times)
# producer-name =
# producer-name =
producer-name
=
inita
producer-name
=
initb
producer-name
=
initc
...
...
@@ -63,7 +63,8 @@ producer-name = initu
private-key
=
["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
# Plugin(s) to enable, may be specified multiple times
# plugin =
# plugin =
plugin
=
eos::producer_plugin
plugin
=
eos::chain_api_plugin
plugin
=
eos::http_plugin
Docker/entrypoint.sh
浏览文件 @
f30ccb00
#!/bin/sh
cd
/opt/eos/bin
if
[
-f
'/opt/eos/bin/data-dir/config.ini'
]
then
if
[
-f
'/opt/eos/bin/data-dir/config.ini'
]
;
then
echo
else
cp
/config.ini /opt/eos/bin/data-dir
fi
if
[
-f
'/opt/eos/bin/data-dir/genesis.json'
]
then
if
[
-f
'/opt/eos/bin/data-dir/genesis.json'
]
;
then
echo
else
cp
/genesis.json /opt/eos/bin/data-dir
fi
if
[
-d
'/opt/eos/bin/data-dir/contracts'
]
;
then
echo
else
cp
-r
/contracts /opt/eos/bin/data-dir
fi
exec
/opt/eos/bin/eosd
README.md
浏览文件 @
f30ccb00
...
...
@@ -103,6 +103,17 @@ sudo mkdir -p /data/store/eos
docker-compose -f docker-compose.yml up
```
Run example contracts
```
cd /data/store/eos/contracts/exchange
docker exec docker_eos_1 eosc setcode exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi
cd /data/store/eos/contracts/currency
docker exec docker_eos_1 eosc setcode currency contracts/currency/currency.wast contracts/currency/currency.abi
```
Done
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录