How does launcher update work in multicontainer setup?

Hello, long pile of text ahead, please bear with me, i’m just curious.

Dual container user here: data and web_only.

In order to update, i ssh into my server, then i imagined i would write:

sh /var/discourse/lanucher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher start web_only

The problem by doing this is that after start I still have the previous version running, not the updated one.
Why is this happening?

In order to have it updated I actually have to run:

sh /var/discourse/launcher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher destroy web_only     // also this
sh /var/discourse/launcher start web_only

My second question is: why does destroy not also delete my newly bootstrapped image?

Another interesting note: I have seen that during bootstrap, there are created and deleted multiple different containers.

Could you please explain a little (bit more?) how launcher works and what trickery it does?

Thanks in advance.

Because “stop” just stops the current running container. You need to also remove it so you launch the new container you built.

“destroy” will destroy containers, not images. In docker speak this is the difference between rm and rmi

Bootstrap creates an “image”

Start will use the “image” to create a “container”

4 Likes

*only if a container doesn’t exist. If the container exists, then it will use the same one (even though it is not from the latest image). ← Is that correct?

yes, that is correct. If the container exists already it will not create a new one.

1 Like

Thanks for all the answers.

Do you think this post could be material for a howto post?

I think the knowledge should probably integrated into an existing howto about multi container setup.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.