Don't forget to run docker remove app when reinstalling discourse

I think I see the problem, and it’s related to the usual conflation of “container instance” and “container image.”

If you look at 10. Post-Install Maintenance, for instance, it says:

Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start:      Start/initialize a container
    stop:       Stop a running container
    restart:    Restart a container
    destroy:    Stop and remove a container
    enter:      Use nsenter to get a shell into a container
    logs:       View the Docker logs for a container
    bootstrap:  Bootstrap a container for the config based on a template
    rebuild:    Rebuild a container (destroy old, bootstrap, start new)
    cleanup:    Remove all containers that have stopped for > 24 hours

In most uses of the word “container” in this help output, it’s referring to an instance of a container. Except in bootstrap, where it refers to an image. (./launcher bootstrap uses docker commit to create a new image from which subsequent container instances can be launched.) I think this was unexpected (and I naively assumed it would affect the current app instance as well.)

In rebuild, the word container refers to both container images and instances since it involves a set of operations that affects both container instances and container images.

And it’s not clear what it refers to in cleanup - will only the instances be removed, or the bootstrapped image as well?