1. 3

  2. 1
    1. You can list stopped containers with docker ps -a and then log with their name/id if you want to remember an easier version.

    2. docker system prune does both at the same time plus other useful delete, like detached networks and volumes.

    1. 1

      For the 1st point, the container is no more listed with docker ps -a . As well, when I ask docker to print logs of the container after the launch, I get the error:
      Error response from daemon: No such container: c91a701ad8d8f
      Maybe your trick may not work systematically, don’t you think?

      For the 2nd point I was not aware of this command. I’ll try it.

      1. 1

        By searching more on your first point, container is completely removed because I use the run command with the --rm option.
        Without this option I can get the logs after the container termination. Thank you!

        1. 1

          Indeed :) Happy to see that it helped!