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
I followed the official installations steps in the image, followed by installing the node via "RUN cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked".
All these commands execute with no errors and the image builds okay.
It is probably relevant to state that, when following the installation steps of rust, I did not add the "RUN rustup update nightly" instruction to the dockerfile, since docker has known problems with this instruction which don't yet have a solution other than just uninstalling and reinstalling rust in the dockerfile (rust-lang/rustup#2232).
Problem:
When I try to run the image with my docker-compose.yml file (which runs the "substrate-contracts-node --dev --tmp
" command), it returns an error stating that "substrate-contracts-node" is not found.
Any idea why this is?
Below is the relevant excerpt of my Dockerfile:
`RUN apt update
RUN echo "*** Get ubuntu and rust packages ***"
RUN apt install -y build-essential pkg-config git clang curl libssl-dev llvm libudev-dev
RUN set -e
RUN echo "*** Instaling Rust environment ***"
RUN curl https://sh.rustup.rs -y -sSf | sh
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
RUN rustup default nightly
RUN echo "*** Initializing WASM build environment"
RUN rustup target add wasm32-unknown-unknown --toolchain nightly
@CatarinaPedreira I think this issue has been resolved in our public channel, is that right?
@athei had replied this to a similar question there:
It appears that the installation directory isn't in your PATH. Try to run it by its full path or add the install dir to your path. Should be in ~/.cargo/bin/
Bug Context:
I have been trying to create a docker image (with parent image https://hub.docker.com/r/paritytech/ci-linux/) for building and running a substrate-contracts-node (https://github.com/paritytech/substrate-contracts-node).
I followed the official installations steps in the image, followed by installing the node via "RUN cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked".
All these commands execute with no errors and the image builds okay.
It is probably relevant to state that, when following the installation steps of rust, I did not add the "RUN rustup update nightly" instruction to the dockerfile, since docker has known problems with this instruction which don't yet have a solution other than just uninstalling and reinstalling rust in the dockerfile (rust-lang/rustup#2232).
Problem:
When I try to run the image with my docker-compose.yml file (which runs the "substrate-contracts-node --dev --tmp
" command), it returns an error stating that "substrate-contracts-node" is not found.
Any idea why this is?
Below is the relevant excerpt of my Dockerfile:
`RUN apt update
RUN echo "*** Get ubuntu and rust packages ***"
RUN apt install -y build-essential pkg-config git clang curl libssl-dev llvm libudev-dev
RUN set -e
RUN echo "*** Instaling Rust environment ***"
RUN curl https://sh.rustup.rs -y -sSf | sh
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
RUN rustup default nightly
RUN echo "*** Initializing WASM build environment"
RUN rustup target add wasm32-unknown-unknown --toolchain nightly
RUN echo "*** Installing Substrate node environment ***"
RUN cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked
RUN echo "*** Start Substrate node template ***"
CMD substrate-contracts-node --dev
`
And docker-compose.yaml:
`# From https://github.com/substrate-developer-hub/substrate-node-template
version: "3.2"
services:
dev:
container_name: contracts-node-template
image: hyperledger/substrate-all-in-one:latest
working_dir: /var/www/node-template
ports:
- "9944:9944"
environment:
- CARGO_HOME=/var/www/node-template/.cargo
volumes:
- .:/var/www/node-template
- type: bind
source: ./.local
target: /root/.local
`
The text was updated successfully, but these errors were encountered: