こんにちは、長いテキストが続きますが、ご辛抱ください。単に気になったので質問します。
データコンテナと web_only コンテナのデュアルコンテナユーザーです。
更新を行うために、サーバーに SSH で接続し、以下のように書こうと考えました。
sh /var/discourse/launcher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher start web_only
しかし、この方法の問題点は、start を実行しても更新されたバージョンではなく、以前のバージョンがまだ実行されていることです。なぜこのようなことが起こるのでしょうか?
実際に更新するには、以下を実行する必要があります。
sh /var/discourse/launcher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher destroy web_container // これも必要
sh /var/discourse/launcher start web_only
2 つ目の質問:destroy を実行しても、新しくブートストラップされたイメージが削除されないのはなぜでしょうか?
もう一つ興味深い点として、ブートストラップ中に複数の異なるコンテナが作成され、削除されているのを目にしました。
launcher の仕組みと、どのようなトリックを行っているのか、もう少し詳しく説明していただけますか?
よろしくお願いいたします。
sam
(Sam Saffron)
2018 年 7 月 30 日午前 2:21
2
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
*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?
sam
(Sam Saffron)
2018 年 7 月 30 日午前 5:06
4
yes, that is correct. If the container exists already it will not create a new one.
「いいね!」 1
Thanks for all the answers.
Do you think this post could be material for a howto post?
sam
(Sam Saffron)
2018 年 7 月 30 日午前 5:22
6
I think the knowledge should probably integrated into an existing howto about multi container setup.
「いいね!」 1
system
(system)
クローズされました:
2018 年 8 月 29 日午前 5:22
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.