Always have a “.dockerignore” and always have “.git” in it

Without “.dockerignore” the whole directory where Dockerfile is in will be sent to docker daemon, which may be huge

And always create a “.git” entry in the file, because this directory can be very big.


P.S. Failling to do this may lead to the hanging of “docker-compose up”. It will show the following message:

docker.api.build._set_auth_headers: Sending auth config ('https://index.docker.io/v1/')

You will wonder what’s wrong with your network, but the truth is that your context is too big.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.