I hope you can help me with the following problem:
I have an Ubuntu Server 20.04 server in which I have docker. I did the docker installation exactly as the official docker site says, without snap.
I have to install an openproject image and I did it with the following command which is on the official openproject site.
sudo mkdir -p /var/lib/openproject/{pgdata,assets}
docker run -d -p 8080:80 --name openproject \
-e OPENPROJECT_HOST__NAME=openproject.example.com \
-e OPENPROJECT_SECRET_KEY_BASE=secret \
-v /var/lib/openproject/pgdata:/var/openproject/pgdata \
-v /var/lib/openproject/assets:/var/openproject/assets \
openproject/community:12
At first it installed successfully without any problems and I was able to log into the site. But after restarting the server and trying to do a docker start of the container I get the following error:
Error response from daemon: error while creating mount source path '/var/lib/openproject/assets': mkdir /var/lib/openproject: read-only file system Error: failed to start containers: openproject
I've already tried uninstalling docker completely and reinstalling it but I still get the same error every time I try to start it.
I researched in a lot of places what could be the cause of the error but there are no clear solutions. Generally I saw that it is an error when installing docker with snap but as I said before, my installation is clean as the docker site says.
This happens because the path is outside the scope of the sandbox that docker creates:
Y
So searching around here a bit: we found this response from the site in English (Translation):
It's probably a path issue with Docker when you install it with snap, you'd better install it with the official Docker documentation.
Remove plugin docker:
Delete the docker directory and the old version (it's ok if they don't exist yet):
Install the official docker package (if you are on ubuntu): https://docs.docker.com/install/linux/docker-ce/ubuntu/
Update: Since posting this answer, I've learned that tools installed with snap are installed in a sandbox with limited permissions outside of that sandbox. This is likely to be the cause, as docker will not have access to the external file system from its isolated sandbox environment.
This same suggestion can be seen