clear docker cache

PHP
//Updated Dec 2020
//laravel artisan clear cache 
php artisan view:clear 
php artisan cache:clear
php artisan route:clear
php artisan config:clear# 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 of the above works for you, you could also prune everything
docker system to prunedocker volume prune
Source

Also in PHP: