-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-409] Add fabric initial image build
Fabric initial image is using for generate crypto config files. Change-Id: Ie71876968602e48fd10d6d19e7b3540d972b791f Signed-off-by: Haitao Yue <hightall@me.com>
- Loading branch information
Showing
5 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright IBM Corp, All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
FROM hyperledger/fabric-tools:x86_64-1.0.6 | ||
|
||
ENV FABRIC_VERSION 1.0.6 | ||
|
||
RUN git clone -b v${FABRIC_VERSION} --depth 1 https://github.com/hyperledger/fabric-samples.git && \ | ||
mkdir -p ~/generate-crypto/channel-artifacts && cd fabric-samples/first-network && \ | ||
cp docker-compose-e2e-template.yaml byfn.sh configtx.yaml crypto-config.yaml ~/generate-crypto && \ | ||
sed -i '/ask for confirmation to proceed/,+1 d' ~/generate-crypto/byfn.sh && \ | ||
rm -rf /tmp/* | ||
|
||
WORKDIR /root/generate-crypto | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& mkdir /root/bin && tar -C /root/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
ENV CHANNEL_NAME mychannel | ||
COPY initial.sh /root/ | ||
CMD bash /root/initial.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ~/generate-crypto/ && ./byfn.sh -m generate -c ${CHANNEL_NAME} && cp -r crypto-config channel-artifacts ~/crypto-files/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright IBM Corp, All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
FROM hyperledger/fabric-tools:x86_64-1.1.0 | ||
|
||
ENV FABRIC_VERSION 1.1.0 | ||
|
||
RUN git clone -b v${FABRIC_VERSION} --depth 1 https://github.com/hyperledger/fabric-samples.git && \ | ||
mkdir -p ~/generate-crypto/channel-artifacts && cd fabric-samples/first-network && \ | ||
cp docker-compose-e2e-template.yaml byfn.sh configtx.yaml crypto-config.yaml ~/generate-crypto && \ | ||
sed -i '/ask for confirmation to proceed/,+1 d' ~/generate-crypto/byfn.sh && \ | ||
rm -rf /tmp/* | ||
|
||
WORKDIR /root/generate-crypto | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& mkdir /root/bin && tar -C /root/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
ENV CHANNEL_NAME mychannel | ||
COPY initial.sh /root/ | ||
CMD bash /root/initial.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ~/generate-crypto/ && ./byfn.sh -m generate -c ${CHANNEL_NAME} && cp -r crypto-config channel-artifacts ~/crypto-files/ |