Docker missing TTY -- `waiting for client connection on 9838...`
abhijeetNmishra opened this issue · 9 comments
nothing happens after this. Node doesn't start
What args are you passing to the dashboard?
This happens to me also within a docker container using docker-compose,
The args are this,
npm start
> nodejs-dashboard ts-node src/app.ts
@pyros2097 can you provide detail for your docker-compose.yml? I think you need to launch with an attached terminal for it to work correctly.
This is how my service is declared,
web:
image: api:latest
build:
context: .
#tty: true
command: npm start
working_dir: /usr/src/app
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
links:
- db
ports:
- "3002:3000"
environment:
SERVER_PORT: 3000
I start my service with docker-compose up. I'll try it again with the attach tty option later as that option allows for colored output of my server logs but crashes the container sometimes due to a docker-compose bug that's why I had disabled it.
Thanks CLI FTW
@pyros2097 were you able to test with attached terminal? thanks!
It doesn't work when I use docker-compose up
but I manually bashed into the web container using docker-compose run web bash
and ran npm start
and it worked. I guess compose needs to be configured in some other way.
docker-compose up
does not create a TTY so the dashboard cannot render.
docker-compose run
does by default create a TTY and that is why it works.
You can also skip the bash session and run the test directly if you like. docker-compose run --rm web npm start
@jjasonclark -- Can you create a short section in the README for using ndb with docker and create a PR that closes this issue? Thanks!
PR #74 has been merged with added language about the require TTY and its use with Docker and Docker compose.