The Docker daemon does the work behind Docker commands. You type a command into the Docker CLI; the daemon creates containers and builds images. The two need not run on the same computer. section 2.1.3 section 2.2.2
Run a first container
After installing Docker, run `docker run busybox echo "Hello World"`. If the image is not available locally, Docker downloads it before the container prints `Hello World`. section 2.1.3
The CLI–daemon distinction matters when building an image. With `docker build -t kiada:latest .`, the current directory is the build context. Its contents are sent to the daemon, which builds the image from the Dockerfile. Keep unnecessary files out of that directory: transferring them can slow a build, particularly when the daemon is remote. section 2.2.2
$ docker build -t kiada:latest . [+] Building 6.7s (8/8) FINISHED => [internal] load build definition from Dockerfile => => transferring dockerfile: 182B => [internal] load metadata for docker.io/library/node:23-alpine => [internal] load .dockerignore => => transferring context: 2B => [1/3] FROM docker.io/library/node:23-alpine... #1 => => resolve docker.io/library/node:23-alpine... => => sha256:dd44ec6132f29f... 6.49kB / 6.49kB #2 => => sha256:18b16449d0c592... 1.93kB / 1.93kB #2 => => ... #2 => [2/3] COPY app.js /app.js #3 => [3/3] COPY html/ /html #4 => exporting to image => => exporting layers => => writing image sha256:afeb94f9465c... #5 => => naming to docker.io/library/kiada:latest #6
The build output shows the Dockerfile being loaded, a base image being resolved, files being copied, and the resulting image being named. section 2.2.2
On Linux, Docker can run directly on the computer. With Docker Desktop on macOS or Windows, the CLI runs on the host while the daemon and its Linux containers run in a VM. A daemon can also run on a remote computer. section 2.1.3 section 2.2.2
