How Do You Create a docker.service File on a Linux Server?

One of the following apply:

Problem scenario #1
You run this: "sudo systemctl start docker"
But you get this: "Failed to start docker.service: Unit docker.service not found."

Problem scenario #2
You run this: "sudo systemctl start docker"
But you get this:
"docker.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing."
or this:
"Failed to start docker.service: Unit docker.service not found."

Problem scenario #3
You run this: sudo systemctl enable docker
But you get this: "Failed to enable unit: Unit file docker.service does not exist."

Solution
Use this posting.

Leave a comment

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