We are testing for space on Docker folder (defaults to /var/docker/aufs/) which is where Docker images live and where having not enough space will fail a rebuild in the middle.
You can find the correct folder that need more space with:
docker info --format '{{.DockerRootDir}}'