This has happened with multiple command variations.
Basically...
First I run the container: docker run -it --publish 8080:8080 --name app_in_docker node:latest
Then I have this response in the next line after a couple seconds:
>
This make it appear that I'm in the container, even though the command line usually looks like:
root@bcb5705c09c1:/#
when I'm in the container.
Anything I type into this >
however shows this:
ReferenceError: <command> is not defined
at repl:1:1
at ContextifyScript.Script.runInThisContext (vm.js:44:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:440:10)
at emitOne (events.js:120:20)
at REPLServer.emit (events.js:210:7)
at REPLServer.Interface._onLine (readline.js:279:10)
at REPLServer.Interface._line (readline.js:626:8)
I've used commands such as ls, cd, exit, help, --help, WORKDIR, docker, error, etc. without any success, I get the same message.
Then I just close docker quickstart terminal (I'm using windows and virtualbox runs in background) and reopen the terminal. I can now go into the container using:
docker exec -it <container_name/id> bash
and the command line now looks like it should: root@bcb5705c09c1:/#
Second semi-related question if you could help! How do I specify the volume path in my computer? I've unsuccessfully incorporated volume like so: docker run -it -v /c/app:/usr/src/app --publish 8080:8080 --name app_in_docker node:latest
with the attempt to connect to files in C:\app folder. Might this be because I'm running virtualbox on windows?
Thank you for any help!