Table of Contents

Docker - Daemon - dockerd

About

The Docker daemon (dockerd) 1) is the hypervisor background process that the docker cli command is calling under the hood.

It's

The daemon creates and manages Docker objects, such as:

The Docker daemon (dockerd) listens for Docker API requests. A daemon can also communicate with other daemons to manage Docker services.

Docker Daemon

See Docker - Architecture

Management

Connection

Env

The Docker daemon can listen for Docker Engine API requests via three different types of Socket 2)

Locally:

dockerd -H unix:///var/run/docker.sock

Remotely: tcp

dockerd  -H tcp://0.0.0.0:2375

You can modify Docker connection using the following environment variables:

export DOCKER_HOST="tcp://0.0.0.0:2375"

Inside a container

If you have the docker cli inside a container that must call the host daemon, you need to mount the socket.

Example:

VOLUME ["/var/run/docker.sock"]
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock image-with-docker:latest bash
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock docker:latest bash
# then from inside
# docker run --rm -d nginx

Start / Stop

Docker Engine (dockerd)

Docker Engine Windows

Windows Service

net stop com.docker.service
The Docker for Windows Service service is stopping.
The Docker for Windows Service service was stopped successfully.

net start com.docker.service
The Docker for Windows Service service is starting.
The Docker for Windows Service service was started successfully.

Docker Daemon Windows

Settings

Docker Daemon Settings