- Docker - Working of Kubernetes
- Docker - Kubernetes Architecture
- Docker - Continuous Integration
- Docker - Compose
- Docker - Logging
- Docker - Cloud
- Docker - Setting ASP.Net
- Docker - Toolbox
- Docker - Setting NGINX
- Docker - Setting MongoDB
- Docker - Setting Node.js
- Docker - Networking
- Docker - Storage
- Docker - Container Linking
- Docker - Instruction Commands
- Building a Web Server Docker File
- Docker - Private Registries
- Docker - Managing Ports
- Docker - Public Repositories
- Docker - Building Files
- Docker - File
- Docker - Containers & Shells
- Docker - Configuring
- Docker - Container & Hosts
- Docker - Architecture
- Docker - Working With Containers
- Docker - Containers
- Docker - Images
- Docker - Hub
- Docker - Installation
- Docker - Installing Docker on Linux
- Docker - Overview
- Docker - Home
Docker Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Docker - Installation
Let’s go through the installation of each product.
Docker for Windows
Once the installer has been downloaded, double-cpck it to start the installer and then follow the steps given below.
Step 1 − Cpck on the Agreement terms and then the Install button to proceed ahead with the installation.
Step 2 − Once complete, cpck the Finish button to complete the installation.
Docker ToolBox
Once the installer has been downloaded, double-cpck it to start the installer and then follow the steps given below.
Step 1 − Cpck the Next button on the start screen.
Step 2 − Keep the default location on the next screen and cpck the Next button.
Step 3 − Keep the default components and cpck the Next button to proceed.
Step 4 − Keep the Additional Tasks as they are and then cpck the Next button.
Step 5 − On the final screen, cpck the Install button.
Working with Docker Toolbox
Let’s now look at how Docker Toolbox can be used to work with Docker containers on Windows. The first step is to launch the Docker Toolbox apppcation for which the shortcut is created on the desktop when the installation of Docker toolbox is carried out.
Next, you will see the configuration being carried out when Docker toolbox is launched.
Once done, you will see Docker configured and launched. You will get an interactive shell for Docker.
To test that Docker runs properly, we can use the Docker run command to download and run a simple HelloWorld Docker container.
The working of the Docker run command is given below −
docker run
This command is used to run a command in a Docker container.
Syntax
docker run image
Options
Image − This is the name of the image which is used to run the container.
Return Value
The output will run the command in the desired container.
Example
sudo docker run hello-world
This command will download the hello-world image, if it is not already present, and run the hello-world as a container.
Output
When we run the above command, we will get the following result −
If you want to run the Ubuntu OS on Windows, you can download the Ubuntu Image using the following command −
Docker run –it ubuntu bash
Here you are telpng Docker to run the command in the interactive mode via the –it option.
In the output you can see that the Ubuntu image is downloaded and run and then you will be logged in as a root user in the Ubuntu container.
Advertisements