<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>int128</author_name>
  <author_url>https://blog.hatena.ne.jp/int128/</author_url>
  <blog_title>GeekFactory</blog_title>
  <blog_url>https://int128.hatenablog.com/</blog_url>
  <categories>
    <anon>docker</anon>
    <anon>linux</anon>
  </categories>
  <description>Dockerホストで新しいコンテナが起動したり既存のコンテナが停止したタイミングで何らかの処理を実行したい場合があります。例えば、リバースプロキシの設定を反映したり、コンテナのURLをレビュアに通知したりといった用途が考えられます。 本記事ではdockerコマンドやRemote APIでイベントを取得して処理する方法を説明します。 docker eventsコマンドを使う docker eventsコマンドを実行すると、イベントが発生した場合に以下のような行が出力されます。 [2014-10-05 03:18:08 +0900 JST] 9f732da00641498f383779b58168…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fint128.hatenablog.com%2Fentry%2F2014%2F10%2F06%2F001840&quot; title=&quot;Dockerコンテナの起動や停止をトリガーにして処理を実行する - GeekFactory&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-10-06 00:18:40</published>
  <title>Dockerコンテナの起動や停止をトリガーにして処理を実行する</title>
  <type>rich</type>
  <url>https://int128.hatenablog.com/entry/2014/10/06/001840</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
