Select Page

Once running a docker build I ran into the error:

docker build --rm -t project-backend:06b1206 .
Sending build context to Docker daemon  994.7MB
Step 1/28 : FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
 ---> e7e3b238011c
Step 2/28 : WORKDIR /app
 ---> Using cache
 ---> 574c81257103
Step 3/28 : EXPOSE 80
 ---> Using cache
 ---> 5baf6a10ad9c
Step 4/28 : EXPOSE 443
 ---> Using cache
 ---> 9d594ac86e87
Step 5/28 : FROM microsoft/dotnet:2.2-sdk AS build
 ---> 2357b6790b9d
Step 6/28 : WORKDIR /src
 ---> Running in 838f2f3867df
lstat /var/lib/docker/overlay2/33422fae8a965ca440e31356a063df374eb72ea9b3f34f13c93ed67fdadb938c/merged/src: stale NFS file handle
root@dev1de:~/project/project-backend# 

running docker image prune and docker container prune did not fix the issue. looking at mount also didn’t bring any issue

docker images
REPOSITORY            TAG                      IMAGE ID            CREATED             SIZE
<none>                <none>                   d5102775961b        14 seconds ago      261MB
microsoft/dotnet      2.2-sdk                  2357b6790b9d        4 days ago          1.74GB
microsoft/dotnet      2.2-aspnetcore-runtime   e7e3b238011c        4 days ago          261MB
busybox               latest                   6d5fcfe5ff17        6 days ago          1.22MB
ubuntu                latest                   549b9b86cb8d        2 weeks ago         64.2MB
portainer/portainer   latest                   ff4ee4caaa23        4 weeks ago         81.6MB

Still, there are 4 images that did not clear, very odd! and apparently I must do a docker image prune -a (with a -a was trick!).

root@dev1de:~/project/project-backend# docker image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted: sha256:d5102775961bf17f1a0df5f7060dccb4faeb2d9b48df3c56885d00a849b3baa1
deleted: sha256:4a42287044968cee892d85562b8cde4d47f407200b448d6cb3b5f6d16c97102e
deleted: sha256:12224d4127a1280e5bcf9dd0ae49e7222160db17ca6bbe327eabfdae3eac6b06
deleted: sha256:4a3b05eaf2cbf42b455a1c40c269baca75908fe85482a58828cf01f4a039db10