Should docker run use the --rm flag instead of requiring an explicit docker rm command later?

  • Steve Hoffman
  • Mar 3 2019
  • Will not implement
  • Attach files
  • Steve Hoffman commented
    03 Mar 16:55
    The documentation [here](https://github.com/storj/storj/wiki/Explorer-Release-Setup-Instructions#upgrading-your-storage-node) requires you to explicitly run `docker rm` to remove the exited container. If `--rm` flag is added to the `docker run` command, the container will cleanup when it exits. I don't know if this conflicts with the `--restart` flag, but since all state is kept in volume bind mounts, it doesn't seem like this extra step is needed. Can't test it myself as I'm still waiting on my invite code :(
  • Robin Slot commented
    24 Mar 17:22
    Won't that also remove the container when you temporarely want to stop and start the container, or on reboot?
  • Admin
    Brandon Iglesias commented
    03 Apr 16:16

    Hey Steve & Robin,

    It will remove the container which is not ideal because then you also lose the logs. We want our users to be able to inspect it when it stops.

    Steve your invitation should be coming soon!