Skip to content
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

buildImage() stream silently fails when build context is too large #538

Open
pmuens opened this issue Oct 18, 2019 · 9 comments
Open

buildImage() stream silently fails when build context is too large #538

pmuens opened this issue Oct 18, 2019 · 9 comments

Comments

@pmuens
Copy link

pmuens commented Oct 18, 2019

Today I stumbled upon a problem where the buildImage() function would silently fail when the passed-in build context is too large.

Here's my call:

const stream = await docker.buildImage({ context }, { dockerfile, t })
return new Promise((resolve, reject) => {
  docker.modem.followProgress(stream, (err, res) => {
    if (err) {
      reject(err)
    }
    resolve(res)
  })
})

And the context is a path to a directory which has a bunch of files. In my case the context included a large node_modules directory.

@pmuens pmuens changed the title buildImage() stream stalls when build context is too large buildImage() stream silently fails when build context is too large Oct 18, 2019
@dannyhuly
Copy link

dannyhuly commented Oct 24, 2019

Same issue here after updating to v3.
In my case the package-lock.json file was the large file.

suggest you use an older version for now

@apocas
Copy link
Owner

apocas commented Oct 24, 2019

Could you give more details about this?
How so "too large"? Larger than what?

@apocas
Copy link
Owner

apocas commented Oct 24, 2019

Is it only happening on v3.x?

Could be related to this: #490

@jmahhh
Copy link

jmahhh commented Jan 1, 2020

+1, had this for a package-lock.json of 308K and node_modules of 30K. Version 3.0.2.

@ilkancelikMA
Copy link

I can verify that this issue is happening after upgrading to v3.x (working fine with 2.5.8). Not sure if it's related to big files or not but surely works after I remove the folder with big files in it. Otherwise it silently gets stuck. No output, no promise resolving, nothing.

@apocas apocas self-assigned this Feb 4, 2020
apocas added a commit that referenced this issue Feb 5, 2020
@apocas
Copy link
Owner

apocas commented Feb 5, 2020

Could someone test the branch https://github.com/apocas/dockerode/tree/debug-build against this?

@killerall
Copy link

@apocas
Same problem here.
With your branch (debug-build), the build worked correctly.

@apocas
Copy link
Owner

apocas commented Mar 17, 2020

Humm so the issue was in the change of tar.pack.
I will revert it and publish.

@apocas
Copy link
Owner

apocas commented Mar 17, 2020

bd5fd18

@apocas apocas added the bug label Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants