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

Provide docker image for cargo-contract #184

Closed
atenjin opened this issue Feb 19, 2021 · 6 comments · Fixed by #323
Closed

Provide docker image for cargo-contract #184

atenjin opened this issue Feb 19, 2021 · 6 comments · Fixed by #323

Comments

@atenjin
Copy link
Contributor

atenjin commented Feb 19, 2021

For substrate runtime, parity uses srtool(https://github.com/paritytech/srtool) to compile wasm. And Solang as well, providing a docker image which contrains newest Solang. (https://github.com/hyperledger-labs/solang/blob/main/Dockerfile)

And we think cargo-contract could also provide such docker image. This docker image could resolve the following things:

  1. The wasm compilation target for same ink contract may be different in different computer, that is way substrate runtime needs srtool to generate deterministic result.
  2. For windows, many users do not have cmake by default, thus, windows users need to parpare cmake before install. If using docker, windows users do not need to install cmake.
  3. For our 3-rd parties, like RedSpot(https://redspot.patract.io/), if we want to unify different environment, an existed docker image is a good choice.

Thus, we help cargo-contract provides a docker image by default.

@atenjin
Copy link
Contributor Author

atenjin commented Feb 22, 2021

related to #125

@TriplEight
Copy link
Contributor

maybe it would make more sense to work on the custom CI image we update and test every day against this project instead of creating a new one?

@trace-andreason
Copy link
Contributor

@TriplEight makes sense to me, feel free to close my PR if that is what y'all end up doing.

@TriplEight
Copy link
Contributor

@trace-andreason contributions are always welcome, the project I linked is also open source. It stores our CI images and automates their update every night, the CI image for contract (docker.io/paritytech/contracts-ci-linux:production) also lives there, please feel free to add to it.

@trace-andreason
Copy link
Contributor

@TriplEight you were right about the binaryen version in the image I was working on not being quite enough to build a contract. Like you said I don't see a reason for having a separate image if there already is an official image y'all use for CI. It might be nice to have a link to that image somewhere in the readme

@TriplEight
Copy link
Contributor

@trace-andreason this is a great point, we'll add it to the readme.

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 a pull request may close this issue.

3 participants