Is It a Best/Recommended Practice to Run “sudo systemctl start docker”?

Problem scenario
You read that you should not run a Docker container as root or with sudo privileges. Can you start the docker service with sudo systemctl start docker?

Solution
Yes, it is acceptable. You can use this:

sudo systemctl start docker

This solution was taken from https://docs.docker.com/config/daemon/systemd/.

Leave a comment

Your email address will not be published. Required fields are marked *