Ken Williams
Ken Williams

Reputation: 24005

Docker seems to have no tty?

I have a very simple docker file called "Yakkety", shown here:

FROM ubuntu:yakkety
RUN apt-get update

I can successfully create an image from this by running docker build -f Yakkety -t my-yakk .. However, when I run a shell in this image, it can't seem to produce any output:

% docker run -t my-yakk /bin/bash
root@ab0f59b63159:/# ls
(hangs)

I have to exit the process by doing control-C.

I think this same process used to work for me under older versions of Docker, but I guess I can't be sure because it was a few months ago.

What can I do to diagnose the issue?

I'm using Docker version 1.12.6, build 78d1802, installed with homebrew. I'm running on Mac OS X Version 10.12.2.

Upvotes: 1

Views: 500

Answers (1)

Adrian Oprea
Adrian Oprea

Reputation: 2940

Try docker run -it my-yakk /bin/bash. When using only the -t flag, you get TTY but it is not interactive. This is why you need to use the -i flag as well.

Upvotes: 1

Related Questions