Unable to make bind mounts with docker (no such container)

I’m struggling to use docker on Ubuntu installed as a snap because I am unable to create any blind mounts.

When I try I’m getting

Jun 09 04:53:23 dockerhost docker.dockerd[698]: time="2020-06-09T04:53:23.486182895Z" level=error msg="logs call failed" error="failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.nyrw2oe4ksxcd32s3wq67ipni" module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx


Jun 09 04:53:23 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:23.486197708Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.o9woiyvnkf5587oob2hg6etk3” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:23 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:23.486213795Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.mjxbv3z20a18j7pbjxmuee4dq” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:23 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:23.486332155Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.v90a5jh2b2oorp90hiu9r5ikb” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:23 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:23.486347096Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.d5uu09ckhox270xlyctosg3fc” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.311923694Z” level=error msg=“fatal task error” error=“mkdir /var/lib/docker: read-only file system” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx service.id=6urrlojqlgpaltmn0asas99oq task.id=oqgbcksrc0cbrfp7764qihdj5
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.512780554Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.d5uu09ckhox270xlyctosg3fc” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.512782805Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.v90a5jh2b2oorp90hiu9r5ikb” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.512798903Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.o9woiyvnkf5587oob2hg6etk3” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.512923783Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.nyrw2oe4ksxcd32s3wq67ipni” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx
Jun 09 04:53:26 dockerhost docker.dockerd[698]: time=“2020-06-09T04:53:26.512939349Z” level=error msg=“logs call failed” error=“failed getting container logs: No such container: portainer_agent.28gaupt04ahvpacxxi5sgg1qx.oqgbcksrc0cbrfp7764qihdj5” module=node/agent/taskmanager node.id=28gaupt04ahvpacxxi5sgg1qx

Following from an earlier thread with a different issue,
cat /proc/version_signature gives Ubuntu 5.4.0-33.37-generic 5.4.34

The error above is from trying to install portainer:agent but I am unable to install anything with a bind mount. The error for the portainer:agent install is

mkdir /var/lib/docker: read-only file system

Anyone got any ideas??

What docker command are you running? Can you provide a reproducer?

Hi @ijohnson

Anything with a blind mount fails with an error about a read only file system.

For example, trying to start a container made with the following setup.

It looks like you’re attempting to mount from the host path /portainer. This is likely being denied by apparmor rules as part of the sandbox. What happens if you mount from a path such as $HOME/*?

1 Like

Yes, agreed with what @daniel said, but also if you have a docker command that we can run, we can help you more specifically. I am not familiar with the interface you are using to know what exactly it does or how it uses docker, but I’m happy to help debug problems you can show from running the docker command from the CLI directly.

@ijohnson and @daniel, thank you both so very much.

Turns out as you correctly indicated that if I edited the bind mounts to point somewhere that I had permissions to write too (using Advanced in portainer if anyone is following along) I can create the container and get it running just fine.

Thank you again both for your assistance.

Peter.

2 Likes