2. Installation and Verification
Prepare Docker Engine or Desktop and verify the CLI, daemon, and Compose.
Choose Your Installation
Use Docker Desktop for a local Windows or macOS workstation. On Linux, choose Docker Engine or Docker Desktop according to your environment. Follow the operating-system-specific steps in the Docker installation documentation.
The examples in this course use Linux containers. Bash automation pages require Bash, such as a Linux shell or WSL.
Verify the Setup
docker version
docker info
docker compose version
docker run --rm hello-world
Expected results:
docker versiondisplays both client and server details.docker infocan contact the Docker daemon.docker compose versionconfirms the Compose plugin is available.hello-worldprints its success message.
Common Problems
If only client details appear, check whether Desktop or the Engine service is running and whether the selected context points to the intended daemon:
docker context ls
docker context show
On Linux, a socket permission error means the current user cannot access the daemon. Follow the documented installation permissions; access to a rootful Docker daemon grants powerful control of its host.
Practice
Record the client version, server version, and active context. Explain why installing the CLI alone does not provide a running daemon.
Quick Interview Answer
The CLI sends requests to a daemon. A working installation needs an accessible daemon, a correctly selected context, and permission to connect.
Previous: 1. Introduction to Docker | Next: 3. Docker Architecture
Add More Questions to This Guide
Know a question that should be here? Share it and help the community!
Open Google Form