Docker/C2/Installation-of-Docker/English

From Script | Spoken-Tutorial
Jump to: navigation, search
Visual Cue Narration
Show Slide:

Title Slide

Hello and welcome to the Spoken Tutorial on Installation of Docker.
Show Slide:

Learning Objectives

In this tutorial, we will learn how to
  • Install Docker and its dependencies on Ubuntu
  • Install Docker Desktop on Windows
  • Download and run a Docker container
Show Slide:

System Requirements

To record this tutorial, I am using
  • Ubuntu Linux OS version 22.04
  • Windows 11 and
  • Docker version 27.0.2
Show Slide:

Installation Requirements

  • You require a working Internet connection.

Show Slide:Installation Requirements

For Linux:

  • 64-bit kernel and CPU support for virtualization.
  • At least 4 GB of RAM.

For Windows:

  • Windows 10 or Higher
  • At least 4 GB of RAM
  • For the installation you require a working Internet connection.
  • Your system should have the following requirements to install Docker.
Show Slide:

Prerequisite

https://www.spoken-tutorial.org

To follow this tutorial,
  • You must have basic knowledge of using Linux terminal
  • For pre-requisite Linux tutorials, please visit this site
Show slide:

Code files

  • The files used in this tutorial are provided in the Code files link.
  • Please download and extract the files.
  • Make a copy and then use them while practising.
Press Ctrl, Alt and T keys.

Type, sudo apt-get update

Press Enter.

Type the password when prompted.

Open the terminal by pressing Ctrl, Alt and T keys simultaneously.

Type the command sudo apt hyphen get update and press Enter.

When prompted for password, enter your password and press Enter.

Wait for the repositories to be updated.

Go to the Downloads directory using the command cd Downloads.

Type,

cat docker_commands.sh Highlight the command

I have downloaded a docker_commands.sh file and saved it in my Downloads folder.

Change to the directory where you have downloaded the code files.

Type cat space docker_commands.sh

To make the docker installation easy we have given the commands in shell script.

We shall use this file and install the dependencies for Docker.

This file is available in the code file link of this tutorial.

Type sudo sh docker_commands.sh and press Enter. In the terminal type the command sudo sh docker_commands.sh and press Enter.

The required packages will start installing.

Wait for the installation to complete.

Type docker --version

Press Enter

Highlight the output of the command.

Once the installation is complete, let us check the version of Docker.

Type the command docker space hyphen hyphen version.

Press Enter.

You may get an updated version from the repository.

Type the command sudo docker run hello-world and pressEnter To verify the installation of Docker, we will run thehello-world Docker image.

Type the commandsudo docker run hello hyphen world and pressEnter.

This command downloads the hello world docker image from Docker Hub.

It then creates a container for the image.

Highlight the container id. The command returns the id of the container created.
Keep the terminal window open and highlight the output of the previous command. On running the hello-world Docker image,Hello from Docker gets printed on the terminal.

If you get the same output, the installation of Docker is successful.

Docker Installation on Windows

https://docs.docker.com/desktop/install/windows-install/

Next we will see how to install Docker on Windows.

To install Docker on Windows, we need to installDocker Desktop.

Open the web browser and go to this website.

Click on Download for Windows button. Now click on the Download for Windows button according to your CPU architecture.

For this tutorial we are using x86_64

Click on Docker Desktop for Windows - x86_64

The download will start.

Wait for the setup to finish downloading.

Run the downloaded installer by double clicking on it.

Click on Yes in the User Account Control prompt.

Once the download is complete, locate the downloaded file.

I have saved in Downloads folder and run the installer by double clicking on it.

Click yes in the User Account Control window.

Keep the installer open. Docker will start installing.
Only narration. For me the version of Docker Desktop is 4 point 31 point 1.

You may download an updated version.

Select Use WSL2 instead of HyperV when prompted. Select Use WSL2 instead of HypherV when prompted.

The installation will continue.

It may take five to ten minutes for the installation to complete.

After installation, click on Close and Restart After the installation is complete, click on Close and Restart.

This will restart your system.

After restarting, open the start menu by clicking on the start button. After restarting, open the start menu by clicking on the start button.
Type “Docker Desktop” in the search bar. Type Docker Desktop in the search bar.
From the search results, select Docker Desktop. From the search results, select Docker Desktop.

The Docker Desktop window will open.

Click on Accept in the Docker Subscription Service Agreement window. Click on Accept in the Docker Subscription Service Agreement window.
Click on Use Recommended Settings option in the Complete Docker Installation window.

Click on the Finish button

Another window will appear with the title “Finish Setting Up Docker Desktop”.

Click on the Use Recommended Settings option.

Click on the Finish button.

Click on Yes in the new User Account Control window. Click on Yes in the new User Account Control window.
Point to the welcome message. The Welcome to Docker Desktop window will appear.
Click on the “Continue without signing in” option. Click on the “Continue without signing in” option.
Choose your role from “What’s your role?” drop down menu

Choose “Student” in What’s your role?

Choose the desired role from the “What’s your role” drop down menu.

Here I am choosing Student.

choose the desired option in “What will you use Docker for?” window.

Selected “For Work”

Click on the Continue button in “What will you use Docker for?”

Hover over skip button

Similarly choose the desired option in “What will you use Docker for?”.

I have selected “For Work”.

Click on the Continue button.

You may skip this action but I will click on Continue to go forward.

Only narration. Wait for the Docker Engine to start running.
Hover over the “Your running containers show up here” text. Once the engine is started, you will be able to see the running containers.

Since we have not created any containers yet, this list is empty.

Open the start menu by clicking on the Start button. Now open the start menu by clicking on the Start button.
Type Command Prompt in the search bar. Search for Terminal in the search bar.
Click on Command Prompt in the search results. Click on Terminal in the search results.


The Terminal window will open.

Type docker --version and press Enter. We can check the version of Docker installed using the following command.

docker hyphen hyphen version.

Here it shows the version 26 point 1 point 4.

The version may differ for you.

Type the command docker run hello-world and press Enter. Now, let’s run a Docker container to verify the installation.

Type the command docker run hello-world and press Enter.

The hello-world Docker image is downloaded from Docker Hub and executed.

Highlight Hello from Docker! The output “Hello from Docker!” confirms the successful installation of Docker.

Close the terminal window..

Close the Docker Desktop.

Show Slide:

Summary

This brings us to the end of this tutorial.

Let us summarise.

In this tutorial, we have learnt to

  • Install Docker and its dependencies on Ubuntu
  • Install Docker Desktop on Windows
  • Download and run a Docker container
Show Slide: About Spoken Tutorial project The video at the following link summarises the Spoken Tutorial project.

Please download and watch it

Show Slide: Spoken Tutorial Workshops The Spoken Tutorial Project team conducts workshops and gives certificates.


For more details, please write to us.

Show Slide:

Answers for THIS Spoken Tutorial

  • Do you have questions in THIS Spoken Tutorial?
  • Please visit this site.
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • The Spoken Tutorial project will ensure an answer
  • You will have to register to ask questions
Show Slide:

Forum for specific questions:

The Spoken Tutorial forum is for specific questions on this tutorial.

Please do not post unrelated and general questions on them.

This will help reduce the clutter.

With less clutter, we can use these discussions as instructional material.

Show Slide: FOSSEE Forum For any general or technical questions on Docker, visit the FOSSEE forum and post your question.
Slide: Acknowledgement Spoken Tutorial Project was established by the Ministry of Education, Government of India.
Show slide:

Thank You

This is Aditya Kushwaha, a FOSSEE semester long intern 2024, IIT Bombay, signing off.

Thanks for joining.

Contributors and Content Editors

Madhurig, Nirmala Venkat