I started a docker container with –rm Is there an easy way to keep it, without redoing everything?

Is there a quick way to save the state of a docker container started with the –rm flag, as if you didn’t specify it?

  • Unable to see non-Latin filename in manually created host volume
  • Docker in Docker: Port Mapping
  • Server Error when logging in to a private docker registry from docker in docker
  • Can I build a Docker image to “cache” a yocto/bitbake build?
  • Capture output from attached docker container
  • Compilation of program on Docker is slow
  • How can I overcame this 500 Server Internal Error when trying to pull google/appengine-java image for Managed VMs?
  • How to use php & nodejs from separate containers
  • Sending a file as a parameter to a container in order to be compiled causes problems
  • Dockerfile can't find my private ssh key
  • Cannot install uwsgi on Alpine
  • Restarting Play application Docker container results in 'This application is already running' - RUNNING_PID is not deleted
  • One Solution collect form web for “I started a docker container with –rm Is there an easy way to keep it, without redoing everything?”

    Only the upcoming 1.10 docker update command would be able to (eventually) do that (cancel a --rm option)

    But the 1.10 version of that command only supports resource configs.
    It will be extended though in the future.

    So for now, this does not seem possible.
    You would have to stop it and relaunch it with the right set of options.

    Note: if the issue is that a volume referenced by that container would be lost if you stopped (and automatically remove) said container, know that you can re-attach that volume to a new container.

    The docker export mentioned by Joachim Isaksson in the comments is one workaround, but it has limitation (ie it won’t export volume)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.