Summary - Installation
- Docker & Kubernetes course
- Beginner
- Lesson 12/82
- 5 min
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
dockergroup. - On Windows/macOS, Docker Desktop is used (with the WSL 2 backend on Windows).
docker versionshows the client and server,docker infothe daemon state.hello-worldtests the installation end to end; stopped containers are seen withdocker ps -a.docker system df/prunemanage disk space;docker contextselects 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
# buraya yazSample solution
docker version --format '{{.Server.Version}}'
docker run --rm hello-world
docker system df
docker context showExpected 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.
docker system prune ____
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 |