SaltedPork
SaltedPork

Reputation: 377

Docker build fails when untar a large file citing not enough space, how do I increase?

Within my Dockerfile I'm running a tar command to untar a large file. It stops with an error saying there is not enough free space. Docker info provides:

Data Space Used: 10.99GB
 Data Space Total: 107.4GB
 Data Space Available: 28.89GB
 Metadata Space Used: 8.892MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.139GB
 Thin Pool Minimum Free Space: 10.74GB

Which one ofthese do I need to increase, and how do I do it. This file when unpacked will be <10GB so my HDD will have plenty of space.

Upvotes: 0

Views: 739

Answers (2)

Junior
Junior

Reputation: 341

You can expand maximum container disk size:

  • Rigth Click Docker icon
  • Settings > Daemon
  • Toggle to Advanced
  • Add this property:

    { "storage-opts": [ "size=120GB" ] }

You should now see:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": false,
  "storage-opts": [
    "size=120GB"
  ]
}
  • Click Apply.

This should work for Windows 10.

Upvotes: 3

yamenk
yamenk

Reputation: 51886

If you have been using docker for a while make sure to do some cleanup using:

docker system prune -f --volumes

Upvotes: 0

Related Questions