Hyperledger Fabric:是否可以并排存在对应于不同版本的多个docker映像?

时间:2018-11-28 05:29:00

标签: docker hyperledger-fabric hyperledger

我想知道是否通过运行安装了Hyperledger Fabric 1.2

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.2.0

,然后通过运行

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.3.0

然后第二个命令将清除与v1.2对应的docker映像?如果不是,那么在docker-compose.yaml中遇到类似image: hyperledger/fabric-ca之类的代码时,docker如何知道要使用哪个版本的hyperledger/fabric-ca

1 个答案:

答案 0 :(得分:0)

来自:https://hyperledger-fabric.readthedocs.io/en/release-1.3/install.html 该脚本执行以下操作:

If needed, clone the hyperledger/fabric-samples repository 
Checkout the appropriate version tag 
Install the Hyperledger Fabric platform-specific binaries and config files for the version specified into the /bin and /config directories of fabric-samples 
Download the Hyperledger Fabric docker images for the version specified

传递1.2.0将会下载相应的docker映像并将其标记为“最新”。 类似地,传递1.3.0将下载相应的docker映像并将其标记为“最新”。其他图像不会被删除(从我在脚本中看到的)。

现在,当您在docker-compose文件中指定image: hyperledger/fabric-ca时,docker将自动寻找latest标签(首先在本地,然后在注册表中)。 由于已经为所需版本运行了引导脚本,因此即使该映像的较新版本在本地可用,相应的映像也会被标记为最新映像-如果先运行1.3.0,然后再运行1.2.0( 1.2.0将带有最新标签)

以下是运行docker image ls之后的1.2.0,之后是1.3.0,然后是1.3.0

hyperledger/fabric-javaenv     1.3.0               2476cefaf833        6 weeks ago         1.7GB
hyperledger/fabric-javaenv     latest              2476cefaf833        6 weeks ago         1.7GB
hyperledger/fabric-ca          1.3.0               5c6b20ba944f        6 weeks ago         244MB
hyperledger/fabric-ca          latest              5c6b20ba944f        6 weeks ago         244MB
hyperledger/fabric-tools       1.3.0               c056cd9890e7        6 weeks ago         1.5GB
hyperledger/fabric-tools       latest              c056cd9890e7        6 weeks ago         1.5GB
hyperledger/fabric-ccenv       1.3.0               953124d80237        6 weeks ago         1.38GB
hyperledger/fabric-ccenv       latest              953124d80237        6 weeks ago         1.38GB
hyperledger/fabric-orderer     1.3.0               f430f581b46b        6 weeks ago         145MB
hyperledger/fabric-orderer     latest              f430f581b46b        6 weeks ago         145MB
hyperledger/fabric-peer        1.3.0               f3ea63abddaa        6 weeks ago         151MB
hyperledger/fabric-peer        latest              f3ea63abddaa        6 weeks ago         151MB
hyperledger/fabric-zookeeper   0.4.13              e62e0af39193        7 weeks ago         1.39GB
hyperledger/fabric-zookeeper   latest              e62e0af39193        7 weeks ago         1.39GB
hyperledger/fabric-kafka       0.4.13              4121ea662c47        7 weeks ago         1.4GB
hyperledger/fabric-kafka       latest              4121ea662c47        7 weeks ago         1.4GB
hyperledger/fabric-couchdb     0.4.13              1d3266e01e64        7 weeks ago         1.45GB
hyperledger/fabric-couchdb     latest              1d3266e01e64        7 weeks ago         1.45GB
hyperledger/fabric-tools       1.2.0               379602873003        4 months ago        1.51GB
hyperledger/fabric-ccenv       1.2.0               6acf31e2d9a4        4 months ago        1.43GB
hyperledger/fabric-orderer     1.2.0               4baf7789a8ec        4 months ago        152MB
hyperledger/fabric-peer        1.2.0               82c262e65984        4 months ago        159MB