Docker read-only file system

Trying to migrate from a temporary working setup on my desktop machine running Docker on Windows 10 (Hyper-V) to a dedicated VM using Ubuntu Server 18.04.1 LTS.

Docker was installed at OS install and then I continued to follow the Docker guide here Xibo 1.8.9 with Docker on Ubuntu 16.04 at the installing Docker Compose section.
Rather than downloading the CMS, I want to copy my current working configuration and populated shared folder to the new Docker server. I copied this into the /opt/xibo folder created and ran docker-compose up -d, however I get the following error.

docker-compose up -d
Creating network “xibo_default” with the default driver
Creating xibo_cms-db_1 … error
Creating xibo_cms-xmr_1 …

ERROR: for xibo_cms-db_1 Cannot start service cms-db: error while creating moun Creating xibo_cms-xmr_1 … done

ERROR: for cms-db Cannot start service cms-db: error while creating mount sourc e path ‘/opt/xibo/shared/db’: mkdir /opt/xibo: read-only file system
ERROR: Encountered errors while bringing up the project.

I have tried to temporarily applied 777 permissions to the shared folder to see if that resolves it but it doesn’t. In the Windows version of Docker you give permission for Docker to access files on a local disk. Is there something similar in the Linux version that I have not done?

Any help approached. Apologies but still learning with Docker!

What user are you running the Docker commands as?

Using the root account, files copied over with same account.

What’s the output of

df -h
touch /opt/xibo/test
rm /opt/xibo/test

Filesystem Size Used Avail Use% Mounted on
udev 914M 0 914M 0% /dev
tmpfs 189M 820K 188M 1% /run
/dev/sda2 98G 5.0G 88G 6% /
tmpfs 942M 60K 942M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 942M 0 942M 0% /sys/fs/cgroup
/dev/loop0 42M 42M 0 100% /snap/docker/179
/dev/loop1 87M 87M 0 100% /snap/core/4917
/dev/sda1 511M 4.6M 507M 1% /boot/efi
tmpfs 189M 0 189M 0% /run/user/0

touch /opt/xibo/test = created file
rm /opt/xibo/test = deleted file

I’ve not tried Docker on 18.04 yet. It may be a problem specific to that as it’s still very new.

Happy to have a look at it via ssh/Team Viewer for you since it’s a learning experience for me too then!

How did you install Docker? With a snap? Or via the official Docker repo?

Not sure if it was snap but I selected it as a package at OS install. Tempted to flatten and try again manually install Docker your way.

Right that’s not what’s in the guide then, so I suspect it’s a snap.

I’d remove that, and follow the instructions in the guide for installing Docker from the official repository, as that’s kept updated.

That was the issue, reinstalled without the snap docker and all is fine. All my settings etc have copied nicely.

Thanks for the help!

1 Like