multiversx / mx-sdk-rust-contract-builder

Docker image (and wrappers) for reproducible contract builds (Rust).
MIT License
1 stars 2 forks source link

Dockerfile not building. #30

Closed johnkirch123 closed 1 year ago

johnkirch123 commented 1 year ago

I am trying to build the image with: docker buildx build --output type=docker . -t sdk-rust-contract-builder:next -f ./Dockerfile like it says in the documents, but I get the following error: ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2384260769/Dockerfile: no such file or directory I haven't found any good resources for solving issues trying to build on multiversx, please help, thanks.

andreibancioiu commented 1 year ago

Hello,

Instead of building the image, you can pull it from here: https://hub.docker.com/r/multiversx/sdk-rust-contract-builder/tags

However, if you'd like to build it locally, simply use docker build (instead of the more powerful docker buildx):

docker build . -t sdk-rust-contract-builder:next -f ./Dockerfile

Let us know how it works :pray:

Also, what OS are you using & what is the Docker version?

johnkirch123 commented 1 year ago

Perfect, that was the quickest response ever, thanks! It is building now. I might have messed up and been in a directory outside of the project. I am on Windows 10 currently, but am trying to learn the smart contracts on Multiversx at home on Ubuntu 22.04, but I can't get past an error 'error[E0554] #![feature] may not be used on the stable release channel-sc-derive,...', the main recommendation is to run mxpy deps install rust --overwrite , cargo clean && cargo build , and rustup default nightly. Which none seem to work, I was thinking about uninstalling and re-installing everything. Docker version 20.10.22, build 3a2c30b

andreibancioiu commented 1 year ago

Glad to hear this, thank you!

@johnkirch123, for the second issue - note that we have an experimental setup for Visual Studio Dev Containers:

https://github.com/multiversx/mx-template-devcontainers

E.g., for the example repository below, see the button "Dev Containers|Open", or the Code (green, upper-right) > Codespaces > Create codespace on main. It will set up an environment containing the necessary dependencies (rust and mxpy, as well). Note though that the setup is still experimental / work in progress.

https://github.com/multiversx/mx-reproducible-contract-build-example-sc