-
Notifications
You must be signed in to change notification settings - Fork 288
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
::Docker::Image.build_from_dir does not stream when passed a block #500
Comments
It seems your chunk size is much larger than per line. Try using |
oh! thanks |
also, how do I change the chunk size? |
so, does the readme need to be updated? cause I started with a copy/paste and it resulted in this error. |
Actually, looking at one of our internal tools, it looks like we do exactly what you're doing and it works fine. I'll pull out the bits of code:
then:
You can reduce the chunk size by creating a new docker connection object with additional parameters:
|
thank you very much for the quick response! |
I was still running into issues getting a normal looking stream from docker after trying the above, using the
You should see stdout identical to running |
It looks like log streaming example shown here in the README does still result in the second issue OP reported (the Here's a small example,
Explicitly changing my
The |
Passing a block to
build_from_dir
does not stream the output, also results in a JSON parse error.docker-api 1.28.0
Repro
Output:
First, I expect to see
*** LOG STATEMENT ***
once per line or on a regular basis.Second, this JSON is invalid. and I get
JSON::ParserError:
The text was updated successfully, but these errors were encountered: