简体   繁体   English

在 Mac 上使用 Docker 构建 Hyperledger Fabric

[英]Build Hyperledger Fabric with Docker on Mac

I'm trying to build Hyperledger Fabric images with Docker on Mac.我正在尝试在 Mac 上使用 Docker 构建 Hyperledger Fabric 映像。 I installed prerequisites and git cloned fabric 1.4 and fabric-ca 1.4.我安装了先决条件和 git cloned fabric 1.4 和 fabric-ca 1.4。 and I typed make docker inside of fabric directory.我在fabric目录中输入了make docker When I did same on unbuntu virtual box, it had no problem.当我在 unbuntu virtual box 上做同样的事情时,它没有问题。 However, I got error on Mac.(Mac Mojave 10.14.3)但是,我在 Mac 上出错。(Mac Mojave 10.14.3)

Error log:错误日志:

Building docker peer-image构建 docker peer-image

docker build -t hyperledger/fabric-peer .build/image/peer docker build -t hyperledger/fabric-peer .build/image/peer

Sending build context to Docker daemon 33.35MB将构建上下文发送到 Docker 守护进程 33.35MB

Step 1/7 : FROM hyperledger/fabric-baseos:amd64-0.4.14 ---> 75f5fb1a0e0c第 1/7 步:从 hyperledger/fabric-baseos:amd64-0.4.14 ---> 75f5fb1a0e0c

Step 2/7 : ENV FABRIC_CFG_PATH /etc/hyperledger/fabric ---> Using cache ---> 07fffab66f6c步骤 2/7:ENV FABRIC_CFG_PATH /etc/hyperledger/fabric ---> 使用缓存 ---> 07fffab66f6c

Step 3/7 : RUN mkdir -p /var/hyperledger/production $FABRIC_CFG_PATH ---> Using cache ---> 12db028c5850第 3/7 步:运行 mkdir -p /var/hyperledger/production $FABRIC_CFG_PATH ---> 使用缓存 ---> 12db028c5850

Step 4/7 : COPY payload/peer /usr/local/bin步骤 4/7:复制有效负载/对等体 /usr/local/bin

---> Using cache ---> 使用缓存

---> 1182063498b1 ---> 1182063498b1

Step 5/7 : ADD payload/sampleconfig.tar.bz2 $FABRIC_CFG_PATH第 5/7 步:添加 payload/sampleconfig.tar.bz2 $FABRIC_CFG_PATH

failed to copy files: Error processing tar file(bzip2 data invalid: bad无法复制文件:处理 tar 文件时出错(bzip2 数据无效:错误

magic value in continuation file):延续文件中的魔法值):

make: *** [.build/image/peer/.dummy-amd64-1.4.1-snapshot-348c677c1]制作:*** [.build/image/peer/.dummy-amd64-1.4.1-snapshot-348c677c1]

Error 1错误 1

I searched every web sites, but I cannot solve it.我搜索了每个网站,但我无法解决它。 Is there anyone know about this error ?有没有人知道这个错误? I already tried: brew install gnu-tar --with-default-names and brew install lib tool .我已经尝试过: brew install gnu-tar --with-default-namesbrew install lib tool

brew install gnu-tar
brew install libtool
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

I have same issue, you need install gnu-tar and libtool, then remove build dir .我有同样的问题,你需要安装 gnu-tar 和 libtool,然后删除 build dir

like this:像这样:

brew install gnu-tar
brew install libtool
export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"

then remove dir build :然后删除 dir build

rm -fr build

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Docker映像的Mac上的Hyperledger无法找到Docker守护进程? - Hyperledger on mac using Docker images cannot find Docker daemon? Mac M1 苹果芯片:Hyperledger Fabric 示例下载:“2.4.1 平台特定结构二进制文件无法下载”错误 - Mac M1 apple chip: Hyperledger Fabric samples download: "2.4.1 platform specific fabric binary is not available to download" Error 适用于Docker机器的Golang Mac OSX版本 - Golang Mac OSX build for Docker machine Docker compose 无法在 mac 上构建特定服务 - Docker compose failed to build a specific service on mac 如何在Mac上为Arm架构构建Docker映像? - How to build a Docker image for an Arm architecture on a Mac? Visual Studio for Mac上的Docker构建错误-当前上下文中没有构建阶段 - Docker build error on Visual Studio for Mac - No build stage in current context HyperLedger Fabric安装挂在中间,在MacOS中没有进行? - HyperLedger Fabric installation is hanging in the middle and not progressing in MacOS? 无法使用新 Mac M1 构建 Docker 映像 - Unable to build Docker image using new Mac M1 Docker for Mac:使用远程上下文时构建代理设置 - Docker for Mac: build proxy settings when using remote context 在Mac上运行Docker,构建工作,运行错误:: / bin / sh:1:[:missing] - Running Docker on Mac, build works, run errors: : /bin/sh: 1: [: missing ]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM