# Rebuild the image
docker build --no-cache
# Pull the base images again and rebuild
docker build --no-cache --pull
# Also works with docker-compose
docker-compose build --no-cache
# If nothing from the above works for you, you could also prune everything
docker system to prune
docker builder prune -a
WARNING! This will remove all build cache. Are you sure you want to continue?
docker build --no-cache -t sample-image:sample-tag .