docker - 如何为 HyperLedger Playground 安装运行 docker?
问题描述
我是超级账本家族的新手,当我从文档https://hyperledger.github.io/composer/latest/installing/development-tools.html安装开发环境时
我停留在第 4 步:安装 Hyperledger Fabric:顺便说一下,我在 windows 中使用 Ubuntu 18.04LTS 终端(不是 bash,来自 windows 商店),它安装的 composer 版本是 0.20.8 所有先决条件都安装成功.
它显示“ Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
”我尝试使用以下命令运行 docker:
$ sudo systemctl start docker
$ sudo service docker start
但是没用!!!
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ cd ~/fabric-dev-servers
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ export FABRIC_VERSION=hlfv12
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ ./downloadFabric.sh
Development only script for Hyperledger Fabric control
Running 'downloadFabric.sh'
FABRIC_VERSION is set to 'hlfv12'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
'''尝试运行 Docker
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ sudo systemctl start docker
System has not been booted with systemd as init system (PID 1). Can't operate.
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ sudo service docker start
* Starting Docker: docker [ OK ]
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$ sudo service docker status
* Docker is not running
harsha@LAPTOP-UDDDOD20:~/fabric-dev-servers$
如何在我的机器上成功运行 docker 服务并在本地运行 hyperledger playground?
解决方案
您不能在 WSL 中轻松运行 docker(即您安装的 windows 商店中的 ubuntu 版本)。
原因是您正在使用的 linux 的 windows 子系统不是具有 linux 内核的 linux 的真正版本。它是一个巧妙的软件,可以动态地将 linux apis 转换为 windows apis。Docker 需要一个真正的 linux 内核才能工作。
我建议您使用诸如 windows hyper-v、vmware 或 virtualbox 之类的管理程序,并将 linux 发行版安装到 vm 中并使用它。
推荐阅读
- batch-file - 用于安排和重新安排未来停机的批处理文件
- r - 转换为日期格式错误:字符串不是标准的明确格式
- flutter - Flutter:找不到目标文件“lib/main.dart”
- python - 如何移动 Pygame 表面?
- python - 关于在 python 中使用套接字的文件 I/O
- google-calendar-api - 过期后如何生成谷歌日历“刷新令牌”?
- html - 如何将绝对定位的元素保留在其位置?
- mysql - 字符类不适用于阿拉伯语文本列
- dart - 使用 Dart 在 windows 中创建目录列表
- javascript - TypeError:未定义不是对象(评估“settings.tableClass”)