Sometimes Docker (its Snap version rather, .i.e. docker-snap ) has some problems when trying to create volumes that are mounted on a directory that doesnot belong to the home directory of the user. In which case, the following ‘Docker mkdir’ error shows up :
mkdir [folder]: read-only file system [docker read only file system issue]
Before reinstalling Docker, you would first need to remove Docker from snap as follows:
snap remove docker
Read: How to solve docker: Got permission denied Error
And the docker directory also would need to be deleted using the command :
rm -R /var/lib/docker
As well as any Docker remaining packages or files using the command :
sudo apt-get remove docker docker-engine docker.io
Read: How to install and setup Docker on Linux/Ubuntu 18.04
Credit: Attila Szili
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.