Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 862 Bytes

File metadata and controls

54 lines (36 loc) · 862 Bytes

基于 Python + Tkinter 的区块链桌面应用程序

安装

  1. 安装 Python 3.6+ is installed.
  2. 安装 pipenv.
$ pip install pipenv 
  1. 创建virtual env.
$ pipenv --python=python3.6
  1. 安装依赖.
$ pipenv install 
  1. 运行节点:
    • $ pipenv run python blockchain.py
    • $ pipenv run python blockchain.py -p 5001
    • $ pipenv run python blockchain.py --port 5002

Docker运行

另一种方式是使用Docker运行:

  1. 克隆库
  2. 构建docker容器
$ docker build -t blockchain .
  1. 运行
$ docker run --rm -p 80:5000 blockchain
  1. 添加多个节点:
$ docker run --rm -p 81:5000 blockchain
$ docker run --rm -p 82:5000 blockchain
$ docker run --rm -p 83:5000 blockchain