osrf / rocker

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

How to avoid specified --rm when creating container use rocker ? #217

Closed HongyanZhi closed 1 year ago

HongyanZhi commented 1 year ago

When I run "rocker --nvidia --x11 --name server --network host --volume /usr/bin/docker --volume /var/run/docker.sock -- osrf/ros:noetic-desktop-full"

It automatically takes the --rm argument like below :

Executing command: docker run --rm -it --name server --network host --gpus all -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 -e XAUTHORITY=/tmp/.docker4drnt_ci.xauth -v /tmp/.docker4drnt_ci.xauth:/tmp/.docker4drnt_ci.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro 48e483761786

Can you tell me how to avoid this ? Thanks!

tfoote commented 1 year ago

Use --nocleanup command line argument.

--nocleanup do not remove the docker container when stopped (default: False)