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 has a degree in software development. He is passionate about gadgets with a screen, nostalgic for phones, a retired gamer and open source programmer. He likes also to write about macOS and Windows. design web pages and debug long programs!

Leave a Reply