How to fix Docker error mkdir [folder]: read-only file system

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.

 

Nikolaus Oosterhof

Nikolaus holds a degree in software development and has a strong passion for all things tech-related, especially gadgets with screens. Though he is nostalgic for older phone models, he's a retired gamer and continues to enjoy programming in open-source environments. Additionally, Nikolaus enjoys writing about Linux, macOS and Windows and has experience designing web pages.

Leave a Reply