Visitar URL original
buildImage() stream silently fails when build context is too large · Issue #538 · apocas/dockerode · GitHub
Skip to content

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

Open

Description

@pmuens

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.

Activity

  1. changed the title [-]buildImage() stream stalls when build context is too large[/-] [+]buildImage() stream silently fails when build context is too large[/+] on Oct 18, 2019
  2. dannyhuly commented on Oct 24, 2019

    @dannyhuly

    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

  3. apocas commented on Oct 24, 2019

    @apocas
    Owner

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

  4. apocas commented on Oct 24, 2019

    @apocas
    Owner

    Is it only happening on v3.x?

    Could be related to this: #490

  5. jmahhh commented on Jan 1, 2020

    @jmahhh

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

  6. ilkancelikMA commented on Jan 10, 2020

    @ilkancelikMA

    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.

  7. self-assigned this
    on Feb 4, 2020
  8. added a commit that references this issue on Feb 5, 2020
  9. apocas commented on Feb 5, 2020

    @apocas
    Owner

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

  10. killerall commented on Feb 27, 2020

    @killerall

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

  11. apocas commented on Mar 17, 2020

    @apocas
    Owner

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

  12. apocas commented on Mar 17, 2020

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions