File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Init image
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ image :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+
13+ - name : Build and Push Init Image
14+ run : |
15+ echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
16+ make init-image
Original file line number Diff line number Diff line change 1717#
1818
1919IMAGE ?= ghcr.io/hyperledger-labs/fabric-operator
20+ INIT_IMAGE ?= ghcr.io/hyperledger-labs/init
2021TAG ?= $(shell git rev-parse --short HEAD)
2122ARCH ?= $(shell go env GOARCH)
2223OSS_GO_VER ?= 1.17.7
2324BUILD_DATE = $(shell date -u +"% Y-% m-% dT% H:% M:% SZ")
2425OS = $(shell go env GOOS)
26+ K8S_TAG = v0.6.0
2527
2628DOCKER_IMAGE_REPO ?= ghcr.io
2729
@@ -47,6 +49,10 @@ image: setup
4749 docker build --rm . -f Dockerfile $(BUILD_ARGS ) -t $(IMAGE ) :$(TAG ) -$(ARCH )
4850 docker tag $(IMAGE ) :$(TAG ) -$(ARCH ) $(IMAGE ) :latest-$(ARCH )
4951
52+ init-image :
53+ docker build --rm . -f sample-network/init/Dockerfile --build-arg K8S_TAG=$(K8S_TAG ) -t $(INIT_IMAGE ) :latest-$(ARCH )
54+ docker push $(INIT_IMAGE ) :latest-$(ARCH )
55+
5056govendor :
5157 @go mod vendor
5258
Original file line number Diff line number Diff line change 1+ ARG K8S_TAG
2+ FROM ghcr.io/hyperledgendary/k8s-fabric-peer:${K8S_TAG} as builder
3+
4+ FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+ RUN microdnf update \
7+ && microdnf install -y \
8+ shadow-utils \
9+ iputils \
10+ tar \
11+ && groupadd -g 7051 ibp-user \
12+ && useradd -u 7051 -g ibp-user -s /bin/bash ibp-user \
13+ && microdnf remove shadow-utils \
14+ && microdnf clean all \
15+ && mkdir -p /opt/hyperledger/k8s_builder/bin;
16+
17+ COPY --from=builder /opt/hyperledger/k8s_builder/bin/ /opt/hyperledger/k8s_builder/bin/
You can’t perform that action at this time.
0 commit comments