docker run... enter container... then every command gets "ReferenceError: <command> is not defined" -
this has happened multiple command variations. basically... first run container: docker run -it --publish 8080:8080 --name app_in_docker node:latest
then have response in next line after couple seconds: >
make appear i'm in container, though command line looks like: root@bcb5705c09c1:/#
when i'm in container. type >
shows this:
referenceerror: <command> not defined @ repl:1:1 @ contextifyscript.script.runinthiscontext (vm.js:44:33) @ replserver.defaulteval (repl.js:239:29) @ bound (domain.js:301:14) @ replserver.runbound [as eval] (domain.js:314:12) @ replserver.online (repl.js:440:10) @ emitone (events.js:120:20) @ replserver.emit (events.js:210:7) @ replserver.interface._online (readline.js:279:10) @ replserver.interface._line (readline.js:626:8)
i've used commands such ls, cd, exit, help, --help, workdir, docker, error, etc. without success, same message.
then close docker quickstart terminal (i'm using windows , virtualbox runs in background) , reopen terminal. can go container using: docker exec -it <container_name/id> bash
, command line looks should: root@bcb5705c09c1:/#
second semi-related question if help! how specify volume path in computer? i've unsuccessfully incorporated volume so: docker run -it -v /c/app:/usr/src/app --publish 8080:8080 --name app_in_docker node:latest
attempt connect files in c:\app folder. might because i'm running virtualbox on windows?
thank help!
not node guy @ all, if @ node:latest
dockerfile you'll see default cmd
executed "node"
. guess you're being dropped kind of node repl shell commands won't work. why exec ... bash
work, you're in bash
, not node
.
if want behaviour first time, put bash
@ end of docker run ...
command , override default defined in dockerfile.
second question, yes it's because you're running in virtualbox on windows. regular setup? or docker-machine (which mounts host folders you) or docker windows (which different kettle of fish again).
Comments
Post a Comment