كيف يعمل تحديث المُطلق في إعداد الحاويات المتعددة؟

مرحبًا، هناك كومة طويلة من النص قادمة، أرجو أن تتحلى بالصبر معي، أنا فقط فضولي.

أنا مستخدم لحاوين مزدوجين: data و web_only.

من أجل التحديث، أتصل بسيرفتي عبر SSH، ثم تخيلت أنني سأكتب:

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

المشكلة عند فعل ذلك هي أنه بعد البدء، لا يزال الإصدار السابق يعمل، وليس الإصدار المحدث.
لماذا يحدث هذا؟

من أجل تحديثه فعليًا، يجب أن أشغل:

sh /var/discourse/launcher bootstrap web_only
sh /var/discourse/launcher stop web_only
sh /var/discourse/launcher destroy web_only     // وكذلك هذا
sh /var/discourse/launcher start web_only

سؤالي الثاني: لماذا لا يحذف أمر destroy أيضًا الصورة التي تم تهيئتها مؤخرًا؟

ملاحظة أخرى مثيرة للاهتمام: لقد لاحظت أنه أثناء عملية التهيئة (bootstrap)، يتم إنشاء وحذف عدة حاويات مختلفة.

هل يمكنك شرحًا بسيطًا (أو أكثر قليلًا؟) لكيفية عمل أداة launcher وما هي الحيل التي تقوم بها؟

شكرًا مقدمًا.

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?

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?

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

إعجاب واحد (1)

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