i deleted the files in the folder /var/lib/docker/overlay2/
now I can’t build the image and get error
Step 1/6 : FROM node:12.13.1 AS build
---> 7be6a8478f5f
Step 2/6 : WORKDIR /lims-ui
lstat /var/lib/docker/overlay2/6da88b2abf0a1786b00cf1566cec75f02908e0e4259399d5b48908f39e6eb1cf: no such file or directory
I tried deleting the image and repull it, but that doesn’t help.
docker inspect 7be6a8478f5f
`Error response from daemon: stat /var/lib/docker/overlay2/6da88b2abf0a1786b00cf1566cec75f02908e0e4259399d5b48908f39e6eb1cf: no such file or directory`
There is no reason to butcher your docker configuration like that
The overlay2 folder contains data for images and container - non of the sub folders of /var/lib/docker should be deleted unless you know exactly what you do and why it needs to be done.
Docker has build-in commands that are ment to be used for house keeping tasks: docker image prune: delete all dangling images (as in without an assigned tag) docker image prune -a: delete all images not used by any container docker system prune: delete stopped containers, unused networks and dangling image + dangling build cache docker system prune -a: delete stopped containers, unused networks, images not used by any container + all build cache
You might want to try if docker system prune -a is able to fix the inconsistent state. If not I would suggest to finish off what you started: stop the docker engine, remove /var/lib/docker, start the docker engine and start with a new slate → everything (volumes, networks, images and containers) will be gone!