如何修改 running 狀態的 container 的 RestartPolicy 呢
docker 在 1.11 版中可以透過 update 去更新了
看一下我們現在的版本
docker -v
Docker version 1.10.3, build 20f81dd
看來有點舊更新一下docker
$ sudo apt-get update
$ sudo apt-get install docker-engine
$ docker -v
Docker version 1.11.2, build b9f10c9
很好, 變成 1.11.2 版了再來看一下現在的 RestartPolicy 設定是什麼
$ docker inspect -f "{{.HostConfig.RestartPolicy.Name}}" containerName
no
我想要設定為 always
$ docker update --restart=always containerName
containerName
再看一下設定是否有更改成功
$ docker inspect -f "{{.HostConfig.RestartPolicy.Name}}" containerName
always
水啦~可以安心睡覺了
Benefits of a Merkur 34C Review and Benefits of a Merkur 34C
回覆刪除Merkur has a very appealing design and a 온라인카지노 very pleasant design. They offer a large selection of adjustable 메리트카지노 headlamp and adjustable safety razors for 온카지노 the