Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated dockerfile with new build arg #3338

Closed
wants to merge 1 commit into from

Conversation

Param-S
Copy link
Contributor

@Param-S Param-S commented Apr 18, 2022

Type of change

  • Bug fix

Description

Updated multistage peer dockerfile with ccbuilder binaries location. It becomes 2 step process to copy the binaries Step 1. copy the files into temporary location, Step 2. copy the files into correction location into docker image

Related issues

#3337

Signed-off-by: Parameswaran Selvam parselva@in.ibm.com

@Param-S Param-S requested a review from a team as a code owner April 18, 2022 13:17
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
VOLUME /etc/hyperledger/fabric
VOLUME /var/hyperledger
COPY --from=peer /go/src/github.com/hyperledger/fabric/build/bin /usr/local/bin
COPY --from=peer /go/src/github.com/hyperledger/fabric/sampleconfig/msp ${FABRIC_CFG_PATH}/msp
COPY --from=peer /go/src/github.com/hyperledger/fabric/sampleconfig/core.yaml ${FABRIC_CFG_PATH}/core.yaml
COPY --from=peer /go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/ccaas_builder/bin/ /opt/hyperledger/ccaas_builder/bin/
COPY --from=peer /go/src/github.com/hyperledger/fabric/release/${MARCH}/bin/ccaas_builder/bin/ /opt/hyperledger/ccaas_builder/bin/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that will work since line 29 is running inside the staged docker image, and $MARCH will point to host architecture rather than the correct one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, It should be set to stage docker image specific os-arch. i think, the value should be read from the previous stage where ccaasbuilder is compiled.

Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
@denyeart
Copy link
Contributor

@mbwhite Can you help with this one?

@mbwhite
Copy link
Member

mbwhite commented Jul 27, 2022

I think that maybe this would be superseded by #3315

@mbwhite
Copy link
Member

mbwhite commented Jul 27, 2022

@Param-S - I think PR #3315 should resolve problems here as well..
Can you say what issue you where hitting?

@C0rWin
Copy link
Contributor

C0rWin commented Jul 31, 2022

@Param-S - I think PR #3315 should resolve problems here as well.. Can you say what issue you where hitting?

The problem here is that #3315 doesn't really help for M1 and arm64-based architecture, because currently, the copy path is hardcoded into Dockerfile:

COPY --from=peer /go/src/github.com/hyperledger/fabric/release/linux-amd64/builders/ccaas/bin/ /opt/hyperledger/ccaas_builder/bin/

So on M1 and arm64, the folder would be linux-arm64, but the script doesn't capture it.

@C0rWin
Copy link
Contributor

C0rWin commented Aug 2, 2022

Given that #3557 merged, we can close this one. Thanks, @Param-S.

@C0rWin C0rWin closed this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants