title: How to restart an existing Docker container in restart="always" mode?
body: <p>When you initially run a Docker container from an image you can specify the option:</p>
  <pre><code>--restart=&quot;always&quot;
  </code></pre>
  <p>This ensures that the container is always restarted by the Docker daemon if for some reason it stops. So you could run a container like so:</p>
  <pre><code>docker run --restart=&quot;always&quot; &lt;IMAGE&gt;
  </code></pre>
  <p>Also you can restart an existing Docker container by specifying its container ID, i.e.:</p>
  <pre><code>docker start &lt;CONTAINER ID&gt;
  </code></pre>
  <p>However I can't determine if it's possible to change an existing container, that originally was not run with the <code>--restart=&quot;always&quot;</code> option, to convert it to always restart in future.</p>
  <p>Currently the only way I can think to do this is to save the container as a new image and then run that image as a new container with the <code>--restart=&quot;always&quot;</code> option. Would this in fact be the correct way to do this?</p>
  <p><strong>EDIT</strong>: What I perhaps didn't make clear enough originally is that I am thinking about the situation where there have been changes in the container since it was originally run, which need to be persisted. So just running a new container from the original image would not be sufficient.</p>