Docker Desktop for Mac restarts every time my laptop wakes up and I have to manually start all my containers by docker start <container>
. Is there a way to do it automatically?
You can try and run your containers with the --restart always
policy.
See docker run
Restart policies.
Always restart the container regardless of the exit status.
When you specify always, the Docker daemon will try to restart the container indefinitely.
The container will also always start on daemon startup, regardless of the current state of the container.
That way, when the docker daemon restart, all containers previously launched with that option should run again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With