https://stackoverflow.com/questions/37599128/docker-how-do-you-disable-auto-restart-on-a-container

90down voteaccepted

You can use the --restart=unless-stopped option, as @Shibashis mentioned, or update the restart policy (this requires docker 1.11 or newer);

See the documentation for docker update and Docker restart policies.

docker update --restart=no my-container

that updates the restart-policy for an existing container (my-container)

docker - how do you disable auto-restart on a container?的更多相关文章

  1. docker 错误:Error response from daemon: cannot stop container: connect: connection refused": unknown

    docker 错误:Error response from daemon: cannot stop container: 795e4102b2de: Cannot kill container 795 ...

  2. Docker: How to enable/disable HTTP Proxy in Toolbox

     1. docker-machine ssh default 2. sudo vi /var/lib/boot2docker/profile 3. # replace with your offi ...

  3. docker报错:Failed to restart docker.service: Unit not found.

    前言:我之前安装好docker了,但是关机重启后,发现docker就没了 报错:Failed to restart docker.service: Unit not found.   解决方法: 1. ...

  4. Resilio-sync auto restart

    syncheck.sh #!/bin/sh if [ $(pgrep xxxrslsync) ]; then echo && date >> /home/pi/sync/s ...

  5. docker启动容器报错: could not synchronise with container process: not a directory

    错误现象 在运行容器时,出现以下错误 [root@localhost test]# docker run -it -d -v $PWD/test.txt:/mydir mytest fd44cdc55 ...

  6. Docker中的三个基本概念容器(container)、镜像(image)和仓库(registry)之间有什么关系?

    Docker镜像是一个特殊的文件系统,除了提供容器运行时所需的程序.库.资源.配置等文件外,还包含了一些为运行时准备的一些配置参数(如匿名卷.环境变量.用户等).镜像不包含任何动态数据,其内容在构建之 ...

  7. docker启动报错解决及分析(Cannot create container for service *******: cannot mount volume over existing file, file exists /var/lib/docker/overlay2/)

    现象: Cannot create container for service *******: cannot mount volume over existing file, file exists ...

  8. REST API disable / enable service auto start by API

    how to disable service auto start by API as the following how to enable service auto start by API as ...

  9. Docker容器学习梳理 - 日常操作总结

    使用Docker已有一段时间了,今天正好有空梳理下自己平时操作Docker时的一些命令和注意细节: Docker 命令帮助 $ sudo docker Commands: attach Attach ...

随机推荐

  1. Lesson 1 Finding fossil man

    Why are legends handed down by storytellers useful? We can read of things that happend 5000 years ag ...

  2. Jackson自定义反序列化

    // 设置jackson时间反系列化格式 SimpleModule module = new SimpleModule(); module.addDeserializer(Date.class, ne ...

  3. gitlab实现webhook触发jenkins 自动,构建,测试,push webhook构子 总结

    最新一直在学习 工作 + 学习 去掉 90%   所以blog  一直没更 真是很不好!  exsi ceph gitlab jenkins harbor k8s  docker-compose ap ...

  4. loadrunner controller查看参数日志

    1.在generator,我们用这个语句来输出参数:lr_output_message("目录为%s", lr_eval_string("{NewParam}" ...

  5. HihoCoder第一周与POJ3974:最长回文字串

    这个题目是hihoCoder第一周的题目,自己打算从第一周开始做起,不知道能追上多少,更不知道这一篇写完,下一篇会是什么时候... 题意很简单. 输入: abababa aaaabaa acacdas ...

  6. PreparedStatement 和 Statement 的区别(推荐使用PreparedStatement)

    PreparedStatement与Statement在使用时的区别: 1.Statement: String sql=" "; executeUpdate(sql) 2. Pre ...

  7. 039、Java中逻辑运算之普通与运算“&”

    01.代码如下: package TIANPAN; /** * 此处为文档注释 * * @author 田攀 微信382477247 */ public class TestDemo { public ...

  8. 数据结构——java Queue类

    定义 队列是一种特殊的线性表,它只允许在表的前端进行删除操作,而在表的后端进行插入操作. LinkedList类实现了Queue接口,因此我们可以把LinkedList当成Queue来用 图例 Que ...

  9. Debian安装wine运行Windows软件

    1.sudo dpkg --add-architecture i386,使系统支持32位应用 2.wget -nc https://dl.winehq.org/wine-builds/Release. ...

  10. class(二)--派生类的继承

    前言 从我之前的一篇笔记对象的继承中, 我们可以知道JS的继承方式依赖原型链,而比较好的继承方式是寄生组合式继承 先来温习下什么是寄生组合式继承 function Rectangle(length, ...