To get a node version - I expect to run the following:
node --version
I'm running the following with docker:
docker run node:4-onbuild -v
I get this:
docker: Error response from daemon: Container command '--version' not found or does not exist..
My question is: How to get version of node from docker container?
docker run -it --rm node /bin/bash -c 'node --version'
– Kinddocker run node:4-onbuild -v
does launch a node:4 docker container, and tries to launch the command-v
which is not a valid bash command, see Kunkka's answer – Bowls