You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use docker-java to execute like docker exec -i <containerId> java -cp /codeStore Main < ~/input.txt ,
When I write String[] cmd Args = new String[] { "java", "-cp", "/codeStore", "Main", "<", "~/input.txt"}; like this As a result, the program kept running and could not be stopped, so I used dockerClient.execStartCmd(execCreateCmdResponse.getId()).withStdIn(inputStream)
The writing method of withStdIn(inputStream) is used in , but the following error occurs;
My requirement is to use a certain output as the input of docker exec.... I sincerely ask the author which API can do this.
16:03:08.420 [docker-java-stream-2145430985] ERROR com.github.dockerjava.api.async.ResultCallbackTemplate - Error during callback
java.lang.UnsupportedOperationException: Does not support hijacking
at com.github.dockerjava.jaxrs.JerseyDockerHttpClient.execute(JerseyDockerHttpClient.java:288)
at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228)
at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
at java.base/java.lang.Thread.run(Thread.java:840)
Exception in thread "main" java.lang.UnsupportedOperationException: Does not support hijacking
at com.github.dockerjava.jaxrs.JerseyDockerHttpClient.execute(JerseyDockerHttpClient.java:288)
at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228)
at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
at java.base/java.lang.Thread.run(Thread.java:840)
The text was updated successfully, but these errors were encountered:
I want to use docker-java to execute like
docker exec -i <containerId> java -cp /codeStore Main < ~/input.txt
,When I write
String[] cmd Args = new String[] { "java", "-cp", "/codeStore", "Main", "<", "~/input.txt"};
like this As a result, the program kept running and could not be stopped, so I useddockerClient.execStartCmd(execCreateCmdResponse.getId()).withStdIn(inputStream)
The writing method of
withStdIn(inputStream)
is used in , but the following error occurs;My requirement is to use a certain output as the input of
docker exec...
. I sincerely ask the author which API can do this.The text was updated successfully, but these errors were encountered: