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

bocker bash doesn't display a prompt #16

Open
basdp opened this issue Jul 30, 2015 · 8 comments
Open

bocker bash doesn't display a prompt #16

basdp opened this issue Jul 30, 2015 · 8 comments

Comments

@basdp
Copy link

basdp commented Jul 30, 2015

It looks like bocker run bash works, but there is no way I can get a prompt. Even 'export PS1="$ "' doesn't work. It is not that big of a problem, but I'm afraid this will just be the tip of the iceberg.

@basdp
Copy link
Author

basdp commented Jul 30, 2015

Probably the same issue. I created a container with a sshd running. When I login, I get the following message:

PTY allocation request failed on channel 0
stdin: is not a tty

@chino
Copy link

chino commented Jul 30, 2015

You can try passing -t I believe?

@basdp
Copy link
Author

basdp commented Jul 30, 2015

ssh -t 10.0.0.15 results in a direct disconnect after the "PTY allocation request failed on channel 0" message.

@basdp
Copy link
Author

basdp commented Jul 30, 2015

Okay, doing some more investigation:
It seems that this line is the problem: 2>&1 | tee "$btrfs_path/$uuid/$uuid.log"
If I remove that part, it seems to work correctly. Although, SSH is still experiencing the same issues.

$CGX:$uuid ip netns exec netns_"$uuid" "unshare" -fmuip --mount-proc "chroot" \
    "$btrfs_path/$uuid" /bin/sh -c "/bin/mount -t proc proc /proc && $cmd" \
    2>&1 | tee "$btrfs_path/$uuid/$uuid.log" || true

@basdp
Copy link
Author

basdp commented Jul 30, 2015

I'm on a roll!

I fixed the SSH issue by running this command in the container:

mount -t devpts none /dev/pts

@p8952
Copy link
Owner

p8952 commented Jul 31, 2015

@basdp Thanks for reporting this. It looks like tee is blocking stdout, probably because the steam is still open. Will try and address this today or tomorrow.

@p8952
Copy link
Owner

p8952 commented Aug 3, 2015

It's probably worth mounting pts by default.

I don't run SSH in containers, can you suggest me a Docker image to test with with?

@jovandeginste
Copy link

If still relevant, this one: https://hub.docker.com/r/evarga/jenkins-slave/

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

4 participants