This repository has been archived by the owner on Dec 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified multi-stage build to clone fabric checkout master build peer binary copy in plugin source (no tests) dep ensure build plugin copy into hyperledger/fabric-peers:latest also had to modify core.yaml to add in pluggable endorsement and validation default settings added check for dependent images added integration-test target refactored multi-stage build, much more efficient add extract of .so from image cleanup docker dross align network_setup.sh cleanup with byfn.sh aligned with v0.18.0 burrow release Change-Id: If8285bce6bd7eb1cb313a37082b2d1419fe75442 Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
- Loading branch information
1 parent
526eb00
commit 298759f
Showing
12 changed files
with
829 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright IBM Corp. All Rights Reserved | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# REQUIRES fabric-buildenv image | ||
# git checkout github.com/hyperledger/fabric && cd fabric && make buildenv | ||
# | ||
# This is the second phase of the fabric-peer-evm image build. | ||
# The first phase builds a baseline image (fabric-peer-evm-base:latest) | ||
# that has a peer built with the 'pluginsenabled' tag set and which | ||
# has the merged vendored dependencies of fabric and the evm plugin. | ||
# If only the go source of the plugin, or the core.yaml have changed, only | ||
# this phase will be built, saving considerable build time. | ||
# | ||
ARG GO_TAGS | ||
ARG CGO_LDFLAGS_ALLOW | ||
|
||
FROM fabric-peer-evm-base:latest as evmscc-builder | ||
COPY ./plugin/evmscc.go ./plugin/evmscc.go | ||
COPY ./statemanager/statemanager.go ./statemanager/statemanager.go | ||
RUN sed -i 's/fabric-chaincode-evm/fabric/g' ./plugin/evmscc.go | ||
RUN dep ensure | ||
RUN ${CGO_LDFLAGS_ALLOW} go build -o /go/lib/evmscc.so -tags '${GO_TAGS}' -buildmode=plugin ./plugin | ||
|
||
FROM hyperledger/fabric-peer:latest | ||
COPY --from=evmscc-builder /opt/gopath/src/github.com/hyperledger/fabric/.build/bin/peer /usr/local/bin/peer | ||
COPY --from=evmscc-builder /go/lib/evmscc.so /opt/lib/evmscc.so | ||
COPY config/core.yaml /etc/hyperledger/fabric |
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,30 @@ | ||
# | ||
# Copyright IBM Corp. All Rights Reserved | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# REQUIRES fabric-buildenv image | ||
# git checkout github.com/hyperledger/fabric && cd fabric && make buildenv | ||
# | ||
# This is the first phase of the fabric-peer-evm image build. | ||
# This phase builds a baseline image (fabric-peer-evm-base:latest) | ||
# that has a peer built with the 'pluginsenabled' tag set and which | ||
# has the merged vendored dependencies of fabric and the evm plugin. | ||
# This phase takes considerably longer than phase 2 (Dockerfile) because | ||
# it must solve for the new dependencies of the plugin and import those into | ||
# the vendor directory of the cloned fabric repository. | ||
# | ||
ARG GO_TAGS | ||
ARG CGO_LDFLAGS_ALLOW | ||
|
||
FROM hyperledger/fabric-buildenv:latest | ||
WORKDIR $GOPATH/src/github.com/hyperledger/ | ||
RUN git clone https://github.com/hyperledger/fabric.git | ||
WORKDIR $GOPATH/src/github.com/hyperledger/fabric | ||
RUN git checkout master | ||
RUN EXECUTABLES=go GO_TAGS=pluginsenabled EXPERIMENTAL=false DOCKER_DYNAMIC_LINK=true make peer | ||
|
||
COPY ./plugin/evmscc.go ./plugin/evmscc.go | ||
COPY ./statemanager/statemanager.go ./statemanager/statemanager.go | ||
RUN sed -i 's/fabric-chaincode-evm/fabric/g' ./plugin/evmscc.go | ||
RUN sed -i '/[[prune]]/ i [[constraint]]\n version = "v0.18.0"\n name = "github.com/hyperledger/burrow"\n\n[[override]]\n revision = "13ed8ac0738b1390630f86f6bf0943730c6d8037"\n name = "github.com/tmthrgd/go-hex"\n\n[[override]]\n revision = "dd20358a264c772b4a83e477b0cfce4c88a7001d"\n name = "github.com/tendermint/go-crypto"\n\n[[override]]\n version = "~0.6.0"\n name = "github.com/tendermint/tmlibs"' ./Gopkg.toml | ||
RUN dep ensure |
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
Oops, something went wrong.