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

Sending build context to Docker daemon is slow #19

Closed
BastianHofmann opened this issue May 13, 2015 · 11 comments
Closed

Sending build context to Docker daemon is slow #19

BastianHofmann opened this issue May 13, 2015 · 11 comments

Comments

@BastianHofmann
Copy link

When I run a docker build the Sending build context to Docker daemon step is slow. It always loads a few MB then it stops for a few seconds before it starts loading the next few MBs.

OSX 10.10.3
Vagrant 1.7.2
VirtualBox 4.3.20
Docker version 1.5.0, build a8a31ef

@codekitchen
Copy link
Owner

Is this specific to one project, or are you seeing this behavior across all docker builds? I'm not aware of anybody else who has run into this. I had one other report of something similar a while back, but it turned out the project just had huge .git and node_modules dirs that weren't in .dockerignore.

@BastianHofmann
Copy link
Author

In this case I'm sendibg abou 250mb. It worked fine with boot2docker.

Sent from my iPhone

On 13.05.2015, at 17:23, Brian Palmer [email protected] wrote:

Is this specific to one project, or are you seeing this behavior across all docker builds? I'm not aware of anybody else who has run into this. I had one other report of something similar a while back, but it turned out the project just had huge .git and node_modules dirs that weren't in .dockerignore.


Reply to this email directly or view it on GitHub.

@lmakarov
Copy link

Had the same issue, see lmakarov/boot2docker-vagrant#13 for a solution.

@codekitchen
Copy link
Owner

Oh that's a great tip, thanks @lmakarov

I'll get this into the next release, in the meantime @BastianHofmann you could manually add this fix to /usr/local/var/dinghy/vagrant/Vagrantfile. I'd love to hear if that solves it for you.

@BastianHofmann
Copy link
Author

Will do.

On 13 May 2015, at 18:43, Brian Palmer [email protected] wrote:

Oh that's a great tip, thanks @lmakarov https://github.com/lmakarov
I'll get this into the next release, in the meantime @BastianHofmann https://github.com/BastianHofmann you could manually add this fix to /usr/local/var/dinghy/vagrant/Vagrantfile. I'd love to hear if that solves it for you.


Reply to this email directly or view it on GitHub #19 (comment).

@BastianHofmann
Copy link
Author

Works great!

On 13 May 2015, at 18:43, Bastian Hofmann [email protected] wrote:

Will do.

On 13 May 2015, at 18:43, Brian Palmer <[email protected] mailto:[email protected]> wrote:

Oh that's a great tip, thanks @lmakarov https://github.com/lmakarov
I'll get this into the next release, in the meantime @BastianHofmann https://github.com/BastianHofmann you could manually add this fix to /usr/local/var/dinghy/vagrant/Vagrantfile. I'd love to hear if that solves it for you.


Reply to this email directly or view it on GitHub #19 (comment).

@codekitchen
Copy link
Owner

Hooray! VM networking is still mostly a mystery to me, I'm afraid. I'll get this fix in.

codekitchen added a commit that referenced this issue May 13, 2015
This reportedly fixes performance issues for some vbox+dinghy users.

Fixes #19
@eibrahim
Copy link

I fixed it by moving my Dockerfile and docker-compose.yml into a subfolder called docker and it worked. Apparently docker sends the current folder to the daemon and my folder was 9 gigs.

@lmakarov
Copy link

@eibrahim If you don't want Docker to pick up your entire folder during the build, you can use a .dockerignore file - https://docs.docker.com/reference/builder/#dockerignore-file

E.g., .dockerignore:

*

@eibrahim
Copy link

Great tip. Didn't think of adding * to .dockerignore. Thanks.

@kvz
Copy link

kvz commented Mar 2, 2017

Adding to this, you can use e.g.:

*
!stack.statuspage

to create a whitelist, vs a blacklist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants