LoginSignup
0
0

More than 1 year has passed since last update.

コンテナを自動起動する

Last updated at Posted at 2020-11-08

設定方法

  1. コンテナを自動起動する。

    docker update --restart=always <container_id>
    
  2. コンテナを手動起動する。

    docker update --restart=no <container_id>
    

確認方法

  1. コンテナの起動方法について確認する。

    docker inspect -f "{{.Name}} {{.HostConfig.RestartPolicy.Name}}" $(docker ps -aq)
    
    /<container_name1> always
    /<container_name2>
    /<container_name3> always
    
0
0
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
0
0