Whats the difference between running docker in daemon mode vs systemctl start docker?
Asked Answered
P

1

6

What is the difference between starting the docker daemon using dockerd and systemctl start docker. When would you use one over the other?

Pasture answered 10/1, 2019 at 17:10 Comment(0)
H
5

A list that is probably not comprehensive:

  • You can configure systemd to run docker when your system boots (systemctl enable docker).
  • If you start the service using systemd, you can ask systemd whether or not it's running (systemctl status docker), and the answer is authoritative (compared to running something like ps | grep dockerd, which can return false positives).
  • If you start the service using systemd, systemd can automatically restart it if it fails.
  • When running the service under systemd, output to stdout/stderr is gathered in the system journal so you can find it via journalctl -u docker.
  • The systemd unit may apply resource limits that improve the behavior of dockerd (e.g., removing the limits on number of files, number of processes, etc)
Halfassed answered 10/1, 2019 at 18:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.