[docker] 設定容器的重啟策略 –restart

### container重啟策略
docker run –restart=policy [OPTIONS] image[:TAG] [COMMAND] [ARG…]
policy可以分為
no        不重啟
on-failure    意外非0返回值,即重啟,也能設定次數
always        全部重啟

範例
docker run –restart=always -d -it ubuntu /bin/bash
###

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: 來玩docker