32
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

restart=alwaysなコンテナを探して自動再起動を解除する

Posted at

restart=alwaysでdocker runしたコンテナを探す

docker inspectとdocker ps -aqを組み合わせて、RestartPolicyの状態を出力し、結果をgrepで絞る

docker inspect -f "{{.Name}} {{.HostConfig.RestartPolicy.Name}}" $(docker ps -aq) | grep always

自動再起動を止める

見つかったコンテナのうち、自動再起動を解除したい任意のコンテナに対してdocker updateする

docker update --restart=no $container_name
32
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?