- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Hello, Edgar.
The error message no space left on device indicates that Docker has run out of disk space while trying to build your image. This is a common issue when Docker's storage, typically located in /var/lib/docker, becomes full with images, containers, volumes, or build cache. Here are steps to resolve the issue:
-
Check Disk Usage Verify if the disk is full using the command:
df -h
-
Cleanup Unused Docker Resources To free up space, remove unused Docker objects:
docker system prune
For a more thorough cleanup (including volumes):
docker system prune -a --volumes
-
- Remove Specific Docker Images
List all images:
docker images
- Remove Specific Docker Images
List all images:
Remove unneeded images:
docker rmi [IMAGE_ID]
Replace [IMAGE_ID] with the actual image ID.
-
Increase Disk Space Consider increasing the disk space for Docker's storage partition, if necessary.
-
Move Docker's Storage Location If needed, change Docker's storage directory by editing /etc/docker/daemon.json:
{ "data-root": "/path/to/new/docker/data" }
Replace /path/to/new/docker/data with the directory path you want to use that has free space.
Then, restart Docker:
sudo systemctl restart docker
Please accept this answer. Otherwise, please let me know for us to troubleshoot.
Regards, Pablo Silva
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 2 anni fa