Docker does not remove unused resources automatically. Unnecessary resources can therefore accumulate over time and use up disk space.
Resolution 1: I did encounter this with container setup and It was due to a lack of free disk space. Clear disk space, use the
docker system prune -a to remove unused Docker images.
This command removes:
- All stopped containers.
- All networks are not used by at least one container.
- All dangling images (not tagged and not referenced by any container).
- All build caches.
-a (or --all) - Removes all images without at least one container associated with them.
Resolution 2: Although my machine had
.NET Core SDK versions 3.1 and
.NET SDK 5.0 (installed as part of VS 2019) the above error occurred,
.Net SDK 6.0 is needed to resolve the error. In other words, after the install you must be able to see the
6.0.xxx folder as in scr shot below:
Hope it helps!