Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No prompt #161

Closed
zanematthew opened this issue Aug 24, 2018 · 2 comments
Closed

No prompt #161

zanematthew opened this issue Aug 24, 2018 · 2 comments

Comments

@zanematthew
Copy link

I have a docker-compose with the following;

version: '3'
services:
  redis:
    image: redis
    command: ["redis-server", "--appendonly", "yes"]
    ports:
      - "6379:6379"
    volumes:
      - "./services/redis/data:/data"

I can start the service, and connect to it, but I do not see a prompt.

I'm connecting to the service using; docker-compose exec -T redis bash, which drops me into a terminal with no prompt, I then can use redis-cli and ping the redis server and get the PONG response, but still no prompt, see below;

$ docker-compose exec -T redis bash
redis-cli
ping
PONG

screen shot 2018-08-24 at 8 48 26 am

I'm currently using Mac OS 10.11.5, using iTerm2 build 3.1.7, but the issue happens with the native Terminal app as well.

Is this an issue with; the redis image? how I'm connecting? related to my local terminal app configuration? I'll also add that this does not happen with other services, I can start a base nginx, or php service and connect to those and those do have a prompt.

@tianon
Copy link
Member

tianon commented Aug 24, 2018

Remove -T from your docker-compose exec line and you'll get prompts -- -T tells docker-compose to not allocate a TTY:

$ docker-compose exec --help
...
    -T                Disable pseudo-tty allocation. By default `docker-compose exec`
                      allocates a TTY.
...

In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

@tianon tianon closed this as completed Aug 24, 2018
@zanematthew
Copy link
Author

wow, thanks, completely over looked that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants