My guess would be that you're not deleting all the volumes and images. I faced the same issue with Vue, and btw it actually should work when you rebuild, but it wasn't. So I just deleted the image itself and volumes. If you type docker system prune -af --volumes
there were still volumes present, the command doesn't entirely remove all images, volumes and containers. I had to type docker volume prune -a
for all the volumes to be removed. So you can try delete everything as you tried before, but before building again, just type docker volume ls
and docker image ls
to be sure.