docker service restart code example

Example 1: how to restart docker linux

$ sudo systemctl start docker

Example 2: docker restart

sudo systemctl restart docker

Example 3: how to start docker

systemctl start docker.service
#(OR)
systemctl start docker
# it will start docker

Example 4: start service docker on linux

sudo systemctl start docker service
sudo systemctl stop docker service

Example 5: docker run restart always

$ docker run --restart=always redis

Example 6: docker run restart on boot

$ docker run -d --restart unless-stopped <image>