docker storage ai_generated true

failed to register layer: Error processing tar file: invalid argument

ID: docker/docker-overlay2-corrupted

Also available as: JSON · Markdown
80%Fix Rate
85%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
27 active — — —

Root Cause

Docker overlay2 storage driver has corrupted layers, typically from disk errors, interrupted pulls, or filesystem issues. Containers using affected layers fail to start.

generic

Workarounds

  1. 90% success Remove the affected image and re-pull it
    docker rmi <image> && docker pull <image> — forces fresh download of all layers

    Sources: https://docs.docker.com/storage/storagedriver/overlayfs-driver/

  2. 95% success If widespread corruption, reset Docker storage entirely
    sudo systemctl stop docker && sudo rm -rf /var/lib/docker/overlay2 && sudo systemctl start docker — WARNING: this removes all local images and containers

    Sources: https://docs.docker.com/storage/storagedriver/overlayfs-driver/

Dead Ends

Common approaches that don't work:

  1. Manually editing files in /var/lib/docker/overlay2 90% fail

    The overlay2 directory structure is managed by Docker; manual edits break layer metadata and content-addressable references

  2. Running docker system prune while containers are still using corrupted layers 75% fail

    Prune skips in-use resources; the corrupted layers remain because containers reference them

Error Chain

Leads to:
Preceded by:
Frequently confused with: