[SOLVED] Docker Help - Error creating mount source

Hello,

Just trying to install a clean version of openhab (in docker) on a new server I am building.

I have installed Ubuntu 18.04.1 server. Installed the docker snap (during ubuntu’s installation).

I have created the openhab user and group with is 9001 and then created the necessary folders

/opt/openhab/(conf, userdata, addons) all owned and writable bt the openhab (9001) user.

Then tried to install openhab with;

sudo docker run
–name openhab
–net=host
–tty
-v /etc/localtime:/etc/localtime:ro
-v /etc/timezone:/etc/timezone:ro
-v /opt/openhab/conf:/openhab/conf
-v /opt/openhab/userdata:/openhab/userdata
-v /opt/openhab/addons:/openhab/addons
-d
–restart=always
openhab/openhab:2.4.0

and I get;

docker: Error response from daemon: error while creating mount source path ‘/opt/openhab/conf’: mkdir /opt/openhab: read-only file system.

Has anyone seen this before.

Thanks for any help

James

It looks like it was docker-snap… Switching out to docker-ce solved this…

Thanks

James

Apologies for the ignorance, but how can I determine what Docker version I’m using and how do I uninstall Docker Snap and re-install the official version of Docker.

Is it possible that both version can be installed side-by-side for some reason?

Update

Found the solution:

Here’s how:

  1. Run sudo snap list to see verify that Docker is installed with snap. If you see it on the list, it is.
  2. Then run: snap remove docker
  3. Reboot.