1
build
starts by creating a tarball from the context directory (in your case .
) and sending that tarball to the server. The tarball is created in the tmp directory I believe, which is probably why you’re running out of space when trying to build.
When you’re working with large datasets the recommended approach is to use a volume. You can use a bind mount volume to mount the files from the host.
Since you’re providing the data using a volume, you’ll want to exclude it from the image context. To do this create a .dockerignore
in the .
directory. In that file add all the paths with large data (.git
, media
, static
).
Once you’ve ignored the large directories the build should work.
Source:stackexchange.com