<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kabegiwakun</author_name>
  <author_url>https://blog.hatena.ne.jp/kabegiwakun/</author_url>
  <blog_title>かべぎわブログ</blog_title>
  <blog_url>https://www.kabegiwablog.com/</blog_url>
  <categories>
    <anon>Docker</anon>
  </categories>
  <description>概要 docker runの--restart=alwaysオプションを利用して、コマンド終了後にコンテナを再起動させてみたいと思います。 コマンド例 以下のように--restart=alwaysオプションを利用してDockerコンテナを起動しています。 ちなみにオプションの意味はこんなかんじ。 オプション 説明 always 常に再起動する on-failure 終了ステータスが0(正常)以外のときに再起動する on-failure:n 終了ステータスが0(正常)以外のときにn回再起動する no 再起動しない(デフォルト) 今回はdateコマンドを実行させてみています。 $ sudo doc…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.kabegiwablog.com%2Fentry%2F2018%2F07%2F20%2F140000&quot; title=&quot;docker run --restart=always でコンテナを再起動させる - かべぎわブログ&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>https://cdn-ak.f.st-hatena.com/images/fotolife/k/kabegiwakun/20180703/20180703221235.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-07-20 14:00:00</published>
  <title>docker run --restart=always でコンテナを再起動させる</title>
  <type>rich</type>
  <url>https://www.kabegiwablog.com/entry/2018/07/20/140000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
