Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

bsideup
Copy link
Member

@bsideup bsideup commented Mar 26, 2021

Fixes #1448

@bsideup
Copy link
Member Author

bsideup commented Mar 29, 2021

It looks like there are two challenges with this:

  1. OkHttp + TCP transport does not pass
  2. Npipe does not implement shutdownOutput properly

putting on hold for now

@luneo7
Copy link

luneo7 commented May 13, 2022

Tested you branch and just changing com.github.dockerjava.okhttp.HijackingInterceptor thread to something like

Thread thread = new Thread(() -> {
    try {
        try (BufferedSink sink = streams.sink) {
            while (sink.isOpen()) {
                int aByte = stdin.read();
                if (aByte < 0) {
                    break;
                }
                sink.writeByte(aByte);
                sink.emit();
            }
        }
        Connection connection = chain.connection();
        if (connection != null) {
            connection.socket().shutdownOutput();
        }
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
});

Makes it work with Okhttp3 =]

@eddumelendez eddumelendez requested a review from a team as a code owner August 19, 2025 18:23
@mikehearn
Copy link

Just hit this! Even just fixing it for some backends would be great. BTW the zerodeps backend has the same issue.

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

Successfully merging this pull request may close these issues.

Stdin remains open in Docker container after closing it on docker-java side via OkHttp
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.