You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FAB-678|1820] Support peer-side Dockerfile generation
Our deployment payloads carry Dockerfile contents in most
contexts. This is problematic for a variety of reasons.
For example, it assumes that the client is in a position to
understand what docker images are available to each and every
peer in the network. Consider that some peers may have
different image availability or be running on different
architectures.
In addition, the client is then responsible for installing
a meaningful peer.crt without having any knowledge of the peers
the chaincode will need to execute against.
It is also a potential source of attack and/or misconfiguration
since it provides another method to execute code within the
endorser network outside of the normal constraints provided by
the chaincode execution environment.
To solve all this, this patch splits the
chaincode::Platform.WritePackage() into two distinct phases:
1) GetDeploymentPayload()
2) GenerateDockerBuild()
Phase (1) is executed in the same context as the previous
WritePackage() operation. That is, solely during
deployment payload generation via the CLI methods.
Phase (2) is now executed only by Endorsers just before
they need to create a Docker image from a given codepackage.
This phase is responsible for synthesizing an appropriate
Dockerfile based on parameters such as the type of chaincode,
the architecture of the peer, the certificate of the peer, etc.
Fixes FAB-1820
Part of the fix for FAB-678.
Change-Id: Ibf04efcde24e3fec30c4b9857b924fbe7654d197
Signed-off-by: Greg Haskins <[email protected]>
0 commit comments