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

前端 未结 4 1382
孤街浪徒
孤街浪徒 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:31

    This requires the Docker service to get started on boot instead of using the default socket activation that starts on-demand like you decribed with execution of "docker ps"

    Here is the required Container Linux Config to enable the Docker service while disabling socket activation:

    systemd:
      units:
        # Ensure docker starts automatically instead of being socket-activated
        - name: docker.socket
          enabled: false
        - name: docker.service
          enabled: true
    

提交回复
热议问题