osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
559 stars 73 forks source link

Saved rocker container starting issue #179

Closed koraykoca closed 2 years ago

koraykoca commented 2 years ago

Hello everyone,

I cannot start docker container, which I created with rocker command, after I exit from the container. I need to enter the same container to be able to reach my previous installed libraries, folders etc.

I want to use Autoware Universe and followed the instructions on the website. I created a docker container with rocker command from the image 'ghcr.io/autowarefoundation/autoware-universe:latest' with this command:

rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --name aw-universe --noclean \
--volume $HOME/autoware \
--volume $HOME/adehome/workspace:$HOME/workspace  \
--volume $HOME/adehome/pycharm:$HOME/pycharm \
-- ghcr.io/autowarefoundation/autoware-universe:latest

It says successfully built 72c229086e34. The output of 'docker container ls' is: container

When I exit from the container (aw-universe) and then enter it with the command 'docker start aw-universe', there is this error: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/tmp/.docker9dh_w1co.xauth" to rootfs at "/tmp/.docker9dh_w1co.xauth" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

My question is: How can I start the saved container, which is generated with rocker?.

Thank you in advance.

tfoote commented 2 years ago

This is similar to #145

I think that there's some of the temporary files that need to be persisted to make this use case work. As the stopped container wants to remount all the volumes it had available when it was previously running.

I think it's getting closer using --nocleanup but I think that the x11 extension does not take that into account and will need to be enhanced to enable the persistance of the xauth file. I've been able to try it with other extensions.

tfoote commented 2 years ago

Potential fix in #189

tfoote commented 2 years ago

Closing with #189 merged. Please comment back if that doesn't resolve your issue.