Containers not restarted after update with restart always in docker-compose.yml

前端 未结 4 1423
孤街浪徒
孤街浪徒 2021-01-15 02:35

I have some containers which all of them have the always restart value in the docker-compose file like this:

version: "3.7"
services:

  container:
         


        
4条回答
  •  半阙折子戏
    2021-01-15 03:18

    From the comments it appears the docker service was not configured to automatically start on boot. Docker is a client server app, and the server runs from systemd with a separate service for the docker socket used by the client to talk to the server. Therefore it's possible for any call with the docker command to cause the server to get launched by hitting the docker socket.

    The service state in systemd can be checked with:

    systemctl status docker
    

    or you may want to check:

    systemctl is-enabled docker
    

    It can be manually started with:

    systemctl start docker
    

    And it can be enabled to start with:

    systemctl enable docker
    

    All of the above commands need to be run as root.

提交回复
热议问题