Difference between revisions of "Docker/C2/Installation-of-Docker/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
  
 
'''System Requirements'''
 
'''System Requirements'''
|| To record this tutorial, I am using * '''Ubuntu Linux OS version 22.04'''  
+
|| To record this tutorial, I am using  
 +
* '''Ubuntu Linux OS version 22.04'''  
 
* '''Windows 11''' and
 
* '''Windows 11''' and
 
* '''Docker version 27.0.2'''
 
* '''Docker version 27.0.2'''
Line 41: Line 42:
 
||  
 
||  
 
* For the installation you require a working Internet connection.
 
* For the installation you require a working Internet connection.
* Your system should have the following requirements to install Docker.
+
* Your system should have the following requirements to install '''Docker'''.
  
 
|-
 
|-
Line 51: Line 52:
 
|| To follow this tutorial,
 
|| To follow this tutorial,
 
* You must have basic knowledge of using Linux terminal
 
* You must have basic knowledge of using Linux terminal
* For pre-requisite Linux tutorials, please visit this website
+
* For pre-requisite Linux tutorials, please visit this site
 
|-
 
|-
 
|| Show slide:
 
|| Show slide:
Line 69: Line 70:
 
Type the password when prompted.
 
Type the password when prompted.
  
|| Open the terminal by pressing Ctrl, Alt and T keys simultaneously.
+
|| Open the terminal by pressing '''Ctrl''', '''Alt''' and '''T''' keys simultaneously.
  
Type the command '''sudo apt hyphen get update '''and press '''Enter.'''
+
Type the command '''sudo apt hyphen get update''' and press '''Enter'''.
  
When prompted for password, enter your password and press '''Enter.'''
+
When prompted for password, enter your password and press '''Enter'''.
  
 
Wait for the repositories to be updated.
 
Wait for the repositories to be updated.
 
|-
 
|-
||  
+
|| Go to the Downloads directory using the command '''cd Downloads.'''
 
+
Go to the Downloads directory using the command '''cd Downloads.'''
+
 
'''Type,'''
 
'''Type,'''
  
 
'''cat docker_commands.sh'''
 
'''cat docker_commands.sh'''
 
Highlight the command
 
Highlight the command
|| I have downloaded the '''docker_commands.sh''' file and saved it in my '''Downloads''' folder.
+
|| 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.
 
Change to the directory where you have downloaded the code files.
  
Line 91: Line 91:
 
To make the docker installation easy we have given the commands in shell script.
 
To make the docker installation easy we have given the commands in shell script.
  
We shall use this file to install the dependencies for '''Docker'''.
+
We shall use this file and install the dependencies for '''Docker'''.
  
 
This file is available in the code file link of this tutorial.
 
This file is available in the code file link of this tutorial.
Line 103: Line 103:
 
Wait for the installation to complete.
 
Wait for the installation to complete.
 
|-
 
|-
||  
+
|| Type '''docker --version '''
 
+
Type '''docker --version '''
+
 
Press '''Enter'''
 
Press '''Enter'''
  
 
Highlight the output of the command.
 
Highlight the output of the command.
||Once the installation is complete, let us check the version of Docker.
+
||Once the installation is complete, let us check the version of '''Docker'''.
  
 
Type the command '''docker space hyphen hyphen version'''.
 
Type the command '''docker space hyphen hyphen version'''.
Line 118: Line 116:
 
|-
 
|-
 
||  Type the command''' sudo docker run hello-world '''and press'''Enter'''
 
||  Type the command''' sudo docker run hello-world '''and press'''Enter'''
||To verify the installation of Docker, we will run the'''hello-world''' Docker image.
+
||To verify the installation of Docker, we will run the'''hello-world''' '''Docker image'''.
  
 
Type the command'''sudo docker run hello hyphen world '''and press'''Enter'''.
 
Type the command'''sudo docker run hello hyphen world '''and press'''Enter'''.
  
This command downloads the'''hello world '''docker image from''' Docker Hub.'''
+
This command downloads the '''hello world '''docker image from''' Docker Hub'''.
 +
 
 
It then creates a container for the image.
 
It then creates a container for the image.
 
|-
 
|-
Line 131: Line 130:
 
||On running the hello-world Docker image,'''Hello from Docker '''gets printed on the terminal.
 
||On running the hello-world Docker image,'''Hello from Docker '''gets printed on the terminal.
  
If you get the same output, then the installation of'''Docker '''is successful.
+
If you get the same output, the installation of '''Docker ''' is successful.
 
|-
 
|-
|| Show slide:
+
|| '''Docker Installation on Windows'''
 
+
'''Docker Installation on Windows'''
+
 
+
 
+
 
+
 
+
 
+
  
 
'''https://docs.docker.com/desktop/install/windows-install/'''
 
'''https://docs.docker.com/desktop/install/windows-install/'''
 
||Next we will see how to install Docker on Windows.
 
||Next we will see how to install Docker on Windows.
  
To install'''Docker '''on'''Windows''', we need to install'''Docker Desktop'''.
+
To install '''Docker ''' on '''Windows''', we need to install'''Docker Desktop'''.
  
 
Open the web browser and go to this website.
 
Open the web browser and go to this website.
 
|-
 
|-
 
|| Click on '''Download for Windows''' button.
 
|| Click on '''Download for Windows''' button.
|| Now click on the '''Download for Windows''' button according to your cpu architecture.  
+
|| Now click on the '''Download for Windows''' button according to your CPU architecture.  
  
 
For this tutorial we are using''' x86_64'''
 
For this tutorial we are using''' x86_64'''
Line 165: Line 157:
 
|| Once the download is complete, locate the downloaded file.
 
|| Once the download is complete, locate the downloaded file.
  
I have saved in the '''Downloads''' folder and run the installer by double clicking on it.
+
I have saved in '''Downloads''' folder and run the installer by double clicking on it.
  
 
Click yes in the '''User Account Control''' window.
 
Click yes in the '''User Account Control''' window.
 
|-
 
|-
 
|| Keep the installer open.
 
|| Keep the installer open.
|| '''Docker '''will start installing.
+
|| '''Docker ''' will start installing.
 
|-
 
|-
 
|| Only narration.
 
|| Only narration.
Line 178: Line 170:
 
|-
 
|-
 
|| Select '''Use WSL2 instead of HyperV '''when prompted.
 
|| Select '''Use WSL2 instead of HyperV '''when prompted.
|| Select '''Use WSL2 instead of HypherV '''when prompted.
+
|| Select '''Use WSL2 instead of HypherV ''' when prompted.
  
 
The installation will continue.
 
The installation will continue.
Line 185: Line 177:
 
|-
 
|-
 
|| After installation, click on Close and Restart
 
|| After installation, click on Close and Restart
|| After the installation is complete, click on''' Close and Restart.'''
+
|| After the installation is complete, click on ''' Close and Restart'''.
  
 
This will restart your system.
 
This will restart your system.
Line 201: Line 193:
 
|-
 
|-
 
|| Click on '''Accept '''in the '''Docker Subscription Service Agreement '''window.
 
|| Click on '''Accept '''in the '''Docker Subscription Service Agreement '''window.
|| 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 '''Use Recommended Settings''' option in the '''Complete Docker Installation''' window.
+
  
 
Click on the '''Finish '''button
 
Click on the '''Finish '''button
Line 212: Line 202:
 
Click on the '''Use Recommended Settings''' option.
 
Click on the '''Use Recommended Settings''' option.
  
Click on the '''Finish '''button.
+
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.
|| Click on '''Yes '''in the new '''User Account Control window.'''
+
|| Click on '''Yes '''in the new '''User Account Control window'''.
 
|-
 
|-
|| Only narration.
+
|| Point to the welcome message.
|| The '''Welcome to Docker''' '''Desktop''' window will appear.
+
|| The '''Welcome to Docker '''Desktop''' window will appear.
 
|-
 
|-
 
|| Click on the “'''Continue without signing in'''” option.
 
|| Click on the “'''Continue without signing in'''” option.
Line 238: Line 228:
 
|| Similarly choose the desired option in “'''What will you use Docker for?'''”.
 
|| Similarly choose the desired option in “'''What will you use Docker for?'''”.
  
I have selected “'''For Work”'''
+
I have selected “'''For Work”'''.
 +
 
 
Click on the '''Continue '''button.
 
Click on the '''Continue '''button.
  
Line 248: Line 239:
 
|| Hover over the “'''Your running containers show up here'''” text.
 
|| Hover over the “'''Your running containers show up here'''” text.
 
|| Once the engine is started, you will be able to see the running '''containers'''.
 
|| Once the engine is started, you will be able to see the running '''containers'''.
Since we have not created any '''container '''yet, this list is empty.
+
 
 +
Since we have not created any '''containers ''' yet, this list is empty.
 
|-
 
|-
 
|| Open the start menu by clicking on the '''Start '''button.
 
|| Open the start menu by clicking on the '''Start '''button.
|| Now 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.
 
|| Type '''Command Prompt''' in the search bar.
Line 269: Line 261:
 
Here it shows the version 26 point 1 point 4.
 
Here it shows the version 26 point 1 point 4.
  
The version may be different for you.
+
The version may differ for you.
 
|-
 
|-
 
|| Type the command '''docker run hello-world''' and press '''Enter'''.
 
|| Type the command '''docker run hello-world''' and press '''Enter'''.
|| Now, let’s run a '''Docker '''container to verify the installation.
+
|| Now, let’s run a '''Docker ''' container to verify the installation.
  
 
Type the command '''docker run hello-world''' and press '''Enter'''.
 
Type the command '''docker run hello-world''' and press '''Enter'''.
  
The''' hello-world''' '''Docker '''image is downloaded from '''Docker Hub''' and '''executed'''.  
+
The''' hello-world''' '''Docker image''' is downloaded from '''Docker Hub''' and '''executed'''.  
 
|-
 
|-
 
|| Highlight '''Hello from Docker!'''
 
|| Highlight '''Hello from Docker!'''
Line 289: Line 281:
  
 
'''Summary'''
 
'''Summary'''
|| This brings us to the end of this tutorial. Let us summarise.
+
|| This brings us to the end of this tutorial.
 +
 
 +
Let us summarise.
  
 
In this tutorial, we have learnt to
 
In this tutorial, we have learnt to
  
* Install '''Docker '''and its dependencies on '''Ubuntu'''
+
* Install '''Docker ''' and its dependencies on '''Ubuntu'''
 
* Install '''Docker Desktop '''on '''Windows'''
 
* Install '''Docker Desktop '''on '''Windows'''
* Download and run a '''Docker '''container
+
* Download and run a '''Docker ''' container
  
 
|-
 
|-
Line 304: Line 298:
 
|-
 
|-
 
|| Show Slide: '''Spoken Tutorial Workshops'''
 
|| Show Slide: '''Spoken Tutorial Workshops'''
|| The '''Spoken Tutorial Project''' teamconducts workshops and gives certificates.
+
|| The '''Spoken Tutorial Project ''' team conducts workshops and gives certificates.
  
  

Latest revision as of 11:32, 20 September 2024

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