-
Notifications
You must be signed in to change notification settings - Fork 91
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
Hangup when build with large files #75
Comments
I think it is due to some large files still omitted to ignore. |
Hi @adoyle-h. Hi need to investigate if I get the the size of the building context from the docker deamon API. Will put this on my todo list. Thanks for reaching out. |
For anyone interested: The docker-build implementation seems to be here: https://github.com/docker/cli/blob/82a80858857aeeb37008bd7d2f4afcda3d39c966/cli/command/image/build.go#L333 |
Okay, so it turns out that habitus relies on go-dockerclient and passes build context as a directory path rather than Habitus: https://github.com/cloud66/habitus/blob/5d45985f7af33d1a6bcbb5c782f80fcf39b829da/build/builder.go#L267 Fortunately, we can switch habitus to pass an |
I am building a large project with many sub-projects (the file structures are complex) and the habitus hangup in long period.
My
build.yml
is simple for test:I run the habitus in my local image
habitus:runner
built based on the latest source code.And run the script to start building:
I have tried to build a simple repo with the same docker image and shell scripts, it works.
I noticed that the building get slower when I generated a 1GB file with
truncate -s 1G block
in the work directory. It will get back to normal when set.dockerignore
to ignore theblock
file.Although I have ignored many things in the large project via
.dockerignore
, it still hang.How can I debug the habitus server?
The text was updated successfully, but these errors were encountered: