Is there a way to disable containers start automatically when docker-daemon not started?

I have 11 containers under docker, and they all run with “–restart=always”. So when docker-daemon service started, all container start automatically at once.

One day after os reboot, the os stucked while starting docker-daemon. Now I disable docker-daemon service started and the os work fine.
To solve the problem below:

  1. How can I disable the container start automatically when docker-daemon not started? modify the container config file to disable? where is the config file location? (docker-daemon start first will make os stucked again)
  2. Or is there a way to start docker-daemon on “safe-mode” (like windows safe-mode) and all container don’t started automatically?

The docker daemon (=docker engine) starts containers with --restart=always. If the docker engine is not running, no container can/will be started.

By any chance, did you create systemd units to control containers (some people for whatever reason do)? Or any other mechanism that is automatically started during system initialization?

Another possible cause is that you installed multiple Docker on the same machine and the one that you disabled is not which started the containers.