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. springboot常见注解 2020-01-19

    1,@SpringBootApplication 是springboot的核心注解,用在启动类上,是由 @Configuration 加载spring,配置spring并启动spring容器; 启动容 ...

  2. jdk1.7推出的Fork/Join提高业务代码处理性能

    jdk1.7推出的Fork/Join提高业务代码处理性能 jdk1.7之后推出了Fork/Join框架,其原理个人理解为:递归多线程并发处理业务代码,以下为我模拟我们公司业务代码做的一个案例,性能可提 ...

  3. LoadRunner接口测试

    [转自http://www.51testing.com/html/87/300987-805230.html] Action(){ //首先调用web_reg_find()这个注册函数,我们接口的正常 ...

  4. 今日份学习:初步的springboot

    今日记录 今日份BUG清单 flyway的sql文件有两个下划线 __ , _ 是不可以的. 高版本的freemarker默认的扩展名变成了flth,而不是ftl 今日份用到的网址 1. freema ...

  5. Binary Tree和Binary Search Tree

    Binary TreeDefinition: at most two children node. Binary Tree Example: 10 ==root /      \ 13        ...

  6. 用 Weave Scope 监控集群【转】

    创建 Kubernetes 集群并部署容器化应用只是第一步.一旦集群运行起来,我们需要确保一起正常,所有必要组件就位并各司其职,有足够的资源满足应用的需求.Kubernetes 是一个复杂系统,运维团 ...

  7. HihoCoder 1245:王胖浩与三角形 三角形边长与面积

    #1245 : 王胖浩与三角形 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 王胖浩有一个三角形,三边长为a,b,c.他有特殊的能力,能增加三条边的边长,增加的总长度不能 ...

  8. 用BusyBox制作Linux最小系统

    1.下载busybox-1.30.1 地址:https://busybox.net/downloads/busybox-1.30.1.tar.bz2 2.解压:tar xvf busybox-1.30 ...

  9. 微信小程序-发送模板消息

    1 添加一个小程序的消息模板,获取到模板id,存储到数据库中,方便以后修改调用 2. https://developers.weixin.qq.com/miniprogram/dev/api-back ...

  10. Day7 - B - Super A^B mod C FZU - 1759

    Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,C<=1000000000,1<=B ...