-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shared volume to copy k8s builder binraies from init to peer container
Signed-off-by: asararatnakar <[email protected]>
- Loading branch information
1 parent
a8d9f52
commit 00c4e70
Showing
7 changed files
with
67 additions
and
26 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
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
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
ARG K8S_TAG | ||
FROM ghcr.io/hyperledgendary/k8s-fabric-peer:${K8S_TAG} as builder | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi-minimal | ||
|
||
ARG K8S_BUILDER_TAG | ||
|
||
RUN microdnf update \ | ||
&& microdnf install -y \ | ||
shadow-utils \ | ||
iputils \ | ||
tar \ | ||
wget \ | ||
&& groupadd -g 7051 ibp-user \ | ||
&& useradd -u 7051 -g ibp-user -s /bin/bash ibp-user \ | ||
&& microdnf remove shadow-utils \ | ||
&& microdnf clean all \ | ||
&& mkdir -p /opt/hyperledger/k8s_builder/bin; | ||
&& microdnf clean all | ||
|
||
WORKDIR /opt/hyperledger/k8s_builder/bin | ||
|
||
COPY --from=builder /opt/hyperledger/k8s_builder/bin/ /opt/hyperledger/k8s_builder/bin/ | ||
RUN wget https://github.com/hyperledger-labs/fabric-builder-k8s/releases/download/${K8S_BUILDER_TAG}/fabric-builder-k8s-${K8S_BUILDER_TAG}-Linux-X64.tgz \ | ||
&& tar -xzf fabric-builder-k8s-${K8S_BUILDER_TAG}-Linux-X64.tgz \ | ||
&& rm -rf fabric-builder-k8s-${K8S_BUILDER_TAG}-Linux-X64.tgz |
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,31 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Copyright contributors to the Hyperledger Fabric Operator project | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 {the "License"}; | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at: | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
docker manifest inspect ${INIT_IMAGE}:${INIT_TAG}-${ARCH} >> /dev/null | ||
|
||
if [[ $? -ne 0 ]]; then | ||
if [[ $1 = "build" ]]; then | ||
docker build --rm . -f sample-network/init/Dockerfile --build-arg K8S_BUILDER_TAG=${K8S_BUILDER_TAG} -t ${INIT_IMAGE}:${INIT_TAG}-${ARCH} | ||
docker tag ${INIT_IMAGE}:${INIT_TAG}-${ARCH} ${INIT_IMAGE}:latest-${ARCH} | ||
elif [[ $1 = "push" ]]; then | ||
docker push ${INIT_IMAGE}:latest-${ARCH} | ||
docker push ${INIT_IMAGE}:${INIT_TAG}-${ARCH} | ||
fi | ||
fi |