/var/lib/docker/containers take up 22 GB out of 32 GB SD card on Raspberry Pi 3

On a Raspberry Pi 3 using Raspbian OS with 32 GB SD card, I found out that the /var/lib/docker/containers takes up 22 GB out of 32 GB on my SD card. I tried to clean Docker by doing the following:

sudo docker system prune -a -f

It worked before, but now it gives this error:

Cannot connect to the Docker daemon at unix://var/run/docker.sock. Is the docker daemon running?

I am not sure what else to do. Plus, I’m running tensorflow on one of my Azure iotedge modules, does tensorflow take up so much space in Docker that it uses up all my disk space on my SD card (32 G) on the Raspberry Pi 3?

Thanks.