I think I\'m going to go crazy. I\'ve searched all over and can\'t seem to find a working solution both here on Stack, GitHub and other far reaches of the interwebs.
<
This is from your build context (that's often the directory where you run your build, but can be overridden as you've done in the compose file). You have a large number of files, or large files, in the context directory that is sent before performing the build.
You can use .dockerignore
which has a nearly identical format to .gitignore
to exclude files from being sent on build. And with BuildKit (enabled if you export DOCKER_BUILDKIT=1
in recent versions of docker) it will only send context when you explicitly copy files and then only when those files have changed from what is available in the cache.
For more on the build context, see: https://docs.docker.com/engine/reference/commandline/build/
There's also the best practices: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/