Coder Social home page Coder Social logo

bocker bash doesn't display a prompt about bocker HOT 8 OPEN

basdp avatar basdp commented on July 18, 2024 1
bocker bash doesn't display a prompt

from bocker.

Comments (8)

basdp avatar basdp commented on July 18, 2024

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

from bocker.

chino avatar chino commented on July 18, 2024

You can try passing -t I believe?

from bocker.

basdp avatar basdp commented on July 18, 2024

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

from bocker.

basdp avatar basdp commented on July 18, 2024

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

from bocker.

basdp avatar basdp commented on July 18, 2024

I'm on a roll!

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

mount -t devpts none /dev/pts

from bocker.

p8952 avatar p8952 commented on July 18, 2024

@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.

from bocker.

p8952 avatar p8952 commented on July 18, 2024

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?

from bocker.

jovandeginste avatar jovandeginste commented on July 18, 2024

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

from bocker.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.