Closed nuke-web3 closed 2 years ago
Example 1: this link https://github.com/paritytech/substrate/blob/master/bin/node-template/docker-compose.yml results in a path error.
works for me right from here.
@chevdor last time updatin the manuals, we've missed a little something: https://github.com/paritytech/substrate/pull/9808/files#diff-da8fcbe728a9172b578e5d754f8e2df214c658c4321f610e63dd68bea828ab49R19-R22
Yes, indeed:
docker run --rm -it parity/substrate node-template --version
outputs:
node-template 3.0.0-9fae71e30a-x86_64-linux-gnu
Just ran it again from a different computer even. Any ideas what could be the issue in my case?
❯ docker run --rm -it parity/substrate node-template --version
error: Found argument 'node-template' which wasn't expected, or isn't valid in this context
USAGE:
substrate [FLAGS] [OPTIONS]
substrate <SUBCOMMAND>
For more information try --help
ok, I think the issue is that I had an old image on my machine. The published image no longer has the node-template
. So the options are:
@koslib if you need a quick solution, you could build an image locally, would that work ?
@chevdor thanks for the proposed solution, but it doesn't seem to work at least out of the box either.
When building the node-template
image from scratch (to be specific, this: https://github.com/paritytech/substrate/tree/master/bin/node-template)
I still get errors
ERROR: for dev Cannot create container for service dev: invalid mount config for type "bind": bind source path does not exist: <redacted path>/substrate/bin/node-template/.local
I'm suspecting that the .local/
path it's trying to find has something to do with rust's compilation, but I don't want to do anything outside of Docker. Am I wrong? Or generally, all ideas welcome.
It sounds like you'd need to creater this folder that does not exist.
For this kind of issue I suggest testing first without binding any path (so no -v
flag).
It help knowing if that works at that point or not.
You may also need to get inspired from https://github.com/paritytech/substrate/blob/master/docker/substrate_builder.Dockerfile#L24-L26
Any update on this? Can this be closed?
Just realized that the problem was on the surface:
docker run --rm -it parity/substrate node-template --version
errors out with an unexpected argument node-template
.
It expects the flags right away as if you'd run a binary.
To specify which binary are you calling, you should override the entrypoint script i.e. adding --entrypoint [new_command]
to `docker call.
Originally by @koslib here :