Bird
Raised Fist0
Dockerdevops~10 mins

Installing Docker - Interactive Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to update the package list before installing Docker.

Docker
sudo apt-get [1]
Drag options to blanks, or click blank then click option'
Aremove
Bupdate
Cupgrade
Dinstall docker
Attempts:
3 left
πŸ’‘ Hint
Common Mistakes
Using 'install' instead of 'update' causes errors because packages are not refreshed.
2fill in blank
medium

Complete the command to install Docker Engine on Ubuntu.

Docker
sudo apt-get install -y [1]
Drag options to blanks, or click blank then click option'
Adocker-ce
Bdocker-compose
Cdocker-swarm
Ddocker-hub
Attempts:
3 left
πŸ’‘ Hint
Common Mistakes
Choosing 'docker-compose' installs a different tool for multi-container apps.
3fill in blank
hard

Fix the error in the command to add Docker’s official GPG key.

Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo [1] --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Drag options to blanks, or click blank then click option'
Agpg --import
Bapt-key add
Cgpg2
Dgpg
Attempts:
3 left
πŸ’‘ Hint
Common Mistakes
Using 'apt-key add' is deprecated and causes warnings.
4fill in blank
hard

Fill both blanks to add the Docker repository to apt sources.

Docker
echo "deb [arch=[1] signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu [2] stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Drag options to blanks, or click blank then click option'
Aamd64
Barm64
Cfocal
Dbionic
Attempts:
3 left
πŸ’‘ Hint
Common Mistakes
Using wrong architecture or Ubuntu codename causes repository errors.
5fill in blank
hard

Fill all three blanks to verify Docker installation by running the hello-world container.

Docker
sudo docker [1] hello-world && sudo docker [2] && sudo docker [3]
Drag options to blanks, or click blank then click option'
Arun
Bps
Cversion
Dstart
Attempts:
3 left
πŸ’‘ Hint
Common Mistakes
Using 'start' instead of 'run' for the first command causes errors.

Practice

(1/5)
1. What is the main purpose of installing Docker on your computer?
easy
A. To create spreadsheets
B. To edit text files
C. To run applications inside containers
D. To browse the internet

Solution

  1. Step 1: Understand Docker's role

    Docker is a tool that allows running applications inside isolated containers.
  2. Step 2: Compare options

    Only To run applications inside containers describes running apps in containers, which is Docker's main use.
  3. Final Answer:

    To run applications inside containers -> Option C
  4. Quick Check:

    Docker runs apps in containers = D [OK]
Hint: Docker runs apps in containers, not for editing or browsing [OK]
Common Mistakes:
  • Confusing Docker with text editors or browsers
  • Thinking Docker is for general software installation
  • Assuming Docker manages spreadsheets
2. Which command correctly checks the installed Docker version after installation?
easy
A. version docker --check
B. docker version check
C. check docker version
D. docker --version

Solution

  1. Step 1: Recall Docker version command syntax

    The correct command to check Docker version is docker --version.
  2. Step 2: Eliminate incorrect syntax

    Other options do not follow Docker CLI syntax and will cause errors.
  3. Final Answer:

    docker --version -> Option D
  4. Quick Check:

    Correct Docker version command = A [OK]
Hint: Use 'docker --version' to check Docker version quickly [OK]
Common Mistakes:
  • Using incorrect command order or words
  • Omitting double dashes before 'version'
  • Trying non-Docker commands to check version
3. After running docker --version, you see this output:
Docker version 24.0.2, build cb74dfc

What does this output tell you?
medium
A. Docker is installed and working
B. Docker is not installed
C. Docker installation failed
D. Docker needs to be updated

Solution

  1. Step 1: Interpret the version output

    The output shows Docker's version number and build info, meaning Docker is installed.
  2. Step 2: Understand what output means

    If Docker was not installed or failed, the command would error or show no version.
  3. Final Answer:

    Docker is installed and working -> Option A
  4. Quick Check:

    Version output means Docker works = C [OK]
Hint: Version output means Docker installed correctly [OK]
Common Mistakes:
  • Thinking version output means failure
  • Confusing version info with error messages
  • Assuming update needed without checking latest version
4. You tried to install Docker on Ubuntu with sudo apt install docker but got an error. What is the likely fix?
medium
A. Use sudo apt install docker.io instead
B. Run docker --version again
C. Restart the computer and try again
D. Install Docker using yum command

Solution

  1. Step 1: Understand Ubuntu package naming

    On Ubuntu, the Docker package is named docker.io, not just docker.
  2. Step 2: Correct the install command

    Using sudo apt install docker.io installs Docker properly on Ubuntu.
  3. Final Answer:

    Use sudo apt install docker.io instead -> Option A
  4. Quick Check:

    Ubuntu Docker package = docker.io = A [OK]
Hint: Ubuntu Docker package is 'docker.io', not 'docker' [OK]
Common Mistakes:
  • Trying to install 'docker' package which doesn't exist
  • Using wrong package manager commands
  • Ignoring error messages without checking package name
5. You want to install Docker on Windows using the official installer. Which step should you do first?
medium
A. Run sudo apt install docker in PowerShell
B. Download Docker Desktop from the official Docker website
C. Open Command Prompt and type docker run
D. Install VirtualBox before Docker

Solution

  1. Step 1: Identify Windows installation method

    Windows users install Docker using Docker Desktop downloaded from Docker's official site.
  2. Step 2: Eliminate incorrect steps

    Linux commands like sudo apt install don't work on Windows; VirtualBox is not required.
  3. Final Answer:

    Download Docker Desktop from the official Docker website -> Option B
  4. Quick Check:

    Windows Docker install starts with official Docker Desktop download = B [OK]
Hint: Windows Docker install starts with official Docker Desktop download [OK]
Common Mistakes:
  • Trying Linux commands on Windows
  • Assuming VirtualBox is needed for Docker
  • Running Docker commands before installation
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard