Skip to content

Writes to stdin not recevied directly #1768

Description

@derklaro

Hi, I'm a little stuck right now. I'm runing a java application inside a docker container and I want to send a command to it. I'm using the following code to attach to the container:

this.stdOut = new PipedOutputStream();
this.stdIn = new PipedInputStream(this.stdOut);

this.dockerClient.attachContainerCmd(this.containerId)
        .withLogs(true)
        .withStdOut(true)
        .withStdErr(true)
        .withStdIn(this.stdIn)
        .withTimestamps(false)
        .withFollowStream(true)
        .exec(new ServiceLogCacheAdapter());

Everything works fine and I can receive data written to stdout/stderr. But when I try to send data to the stdout stream the data is not received by the application until the application sends out a message to std out/err. I'm currently not sure if this is an issue on my end and I'm hoping someone can help me with this. Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions