Come funziona l'aggiornamento del launcher in un setup multicontainer?

Ciao, c’è una lunga sequenza di testo in arrivo, per favore abbi pazienza con me, sono solo curioso.

Utente con due container qui: data e web_only.

Per aggiornare, faccio ssh sul mio server, poi ho immaginato di scrivere:

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

Il problema nel fare questo è che dopo lo start ho ancora la versione precedente in esecuzione, non quella aggiornata.
Perché sta succedendo questo?

Per ottenere l’aggiornamento devo effettivamente eseguire:

sh /var/discourse/launcher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher destroy web_only     // anche questo
sh /var/discourse/launcher start web_only

La mia seconda domanda è: perché destroy non elimina anche la mia immagine appena avviata con bootstrap?

Un’altra nota interessante: ho notato che durante il bootstrap vengono creati e cancellati diversi container.

Potreste spiegare un po’ (più?) come funziona launcher e quali trucchi utilizza?

Grazie in anticipo.

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 Mi Piace

*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 Mi Piace

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 Mi Piace

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