CodeBlanks Logo Icon CodeBlanks

Summary - Installation

Combine install commands to run a system check.

Summary: installation

In this group:

  • On Linux, Docker Engine is installed with the official script; the user is added to the docker group.
  • On Windows/macOS, Docker Desktop is used (with the WSL 2 backend on Windows).
  • docker version shows the client and server, docker info the daemon state.
  • hello-world tests the installation end to end; stopped containers are seen with docker ps -a.
  • docker system df / prune manage disk space; docker context selects the target daemon.

Practice Installation checklist

Write four commands: print the daemon version with --format; run hello-world (deleted when done); show the disk usage; show the active context (docker context show).

Starter code

terminal
# buraya yaz

Sample solution

terminal
docker version --format '{{.Server.Version}}'
docker run --rm hello-world
docker system df
docker context show

Expected output

27.3.1
Hello from Docker!
TYPE            TOTAL     ACTIVE    SIZE
Images          1         0         13kB
default

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which is used in a script to get only the Docker server version?

  • docker version --format '{{.Server.Version}}' Correct answer
  • docker info --all
  • docker --server
  • docker ps -v

Explanation: --format selects a single field with a Go template.

2 Clean up everything unused without confirmation.

Question
docker system prune ____
Answer
docker system prune -f

Explanation: -f (force) doesn't ask for confirmation.

3 Match.

Term Meaning
docker version Versions
docker info Daemon details
docker system df Space usage
hello-world End-to-end test

All lessons in Beginner