What is the difference between dockerd and docker

Docker and Dockerd are two separate components that work together to form the Docker runtime environment.

"dockerd" is the daemon (or background service) that runs on a host machine, and it is responsible for creating, managing, and maintaining Docker containers. It does this by communicating with the Docker client through the Docker API. When you run commands like "docker run" or "docker stop" on the command line, you are sending those commands to the Docker daemon, which then carries out the requested action.

"docker" is the command-line client that you use to interact with the Docker daemon. It allows you to issue commands to the daemon, such as starting or stopping containers, creating new images, and so on. When you run a command like "docker run", the client sends that command to the daemon, which then carries out the requested action.

In summary, Docker daemon (dockerd) runs on the host and manage the container life-cycle and Docker command-line client that you use to interact with the Docker Daemon, like sending command to create, start and stop containers and more.