Поиск  
Always will be ready notify the world about expectations as easy as possible: job change page
месяц назад

Get started with Docker on Windows: Easy installation guide

Get started with Docker on Windows: Easy installation guide
Автор:
Bhushan Kadam
Источник:
Просмотров:
302
Get started with Docker on Windows: Easy installation guide favorites 0

In this article, we will check the detailed step-by-step guide to installing docker on Windows operating system. After the installation is completed, we will also try to pull one docker image and run it on our local docker instance. It's going to be fun, so stay tuned.

What is Docker?

Docker is a platform on which you can develop, ship, and run your applications. Using docker, you can separate your applications from your infrastructure and deliver the software very fast. Using Docker, it's easy to manage the infrastructure in the same way as your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.

You can find more information on docker in the official documentation.

System requirements

As per the official Docker Documentation, the following requirements are a must for the Windows operating system for the installation of Docker.

WSL2 backend

For using WSL2 Backend to deploy Linux Containers, the following requirements are needed –

  1. Windows 11 64-bit Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
  2. Windows 10 64-bit Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
  3. Enable the WSL 2 feature on Windows. For a guide on enabling this feature, you can check Microsoft Documentation.
  4. Some hardware prerequisites are also needed to successfully run WSL 2 on Windows 10 or Windows 11 -
    1. 64-bit processor with SLAT (Second Level Address Translation)
    2. 4GB system RAM
    3. BIOS-level hardware virtualization support must be enabled in the BIOS settings. You can get more information on Virtualization here.
    4. Download and install the Linux kernel update package.

Hyper-V backend

For using the Hyper-V backend to deploy Windows containers, the following requirements are needed –

  1. Windows 11 64-bit Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
  2. Windows 10 64-bit Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
  3. For Windows 10 and Windows 11 Home, refer to the system requirements in the WSL 2 backend section.
  4. Hyper-V and Containers Windows features must be enabled.
  5. Some hardware prerequisites are needed to successfully run Client Hyper-V on Windows 10 –
    1. 64-bit processor with SLAT (Second Level Address Translation)
    2. 4GB system RAM
    3. BIOS-level hardware virtualization support must be enabled in the BIOS settings. You can get more information on Virtualization here.

If all the system requirements are satisfied, we are all set for installation.

Installation guide

Step 1 - Download Docker installer

Download the latest version of the Docker Desktop installer from https://docs.docker.com/desktop/install/windows-install/.

Step 2 - Run Docker installer

Once it is downloaded, open the installer executable and you should see the below screen -

Docker installation wizard

Follow the instructions on the Installation wizard and complete the installation.

Docker installation success

Step 3 - Verify Docker installation

Now that the installation is complete, open the start menu and type docker, and you will see the "Docker Desktop" in the search Results.

Docker start menu

Click on Docker desktop and on the first run it will ask to accept the Service Agreement.

Docker terms

Once you click on accept, the docker desktop window will open. This confirms that docker is installed correctly.

Docker start window

You can also verify the docker installation from Powershell or the command prompt by typing the command "docker --version" and it will display the installed version of docker CLI.

Check docker version

Now we are ready to run our first docker image. Let's try to pull and run the Nginx web server on docker. For this let's first pull the latest image of Nginx by typing the command "docker pull nginx"

Docker pull nginx image

Now let's run the Nginx server by typing the command "docker run -it --rm -d -p 8080:80 --name web nginx".

Docker run nginx container

This should start the container on the docker, you can see the container id on the PowerShell screen above.

You should also be able to see the running container in the Docker Desktop application.

Docker nginx container running

Now, navigate to the address "http://localhost:8080/" on your browser and you should see the Nginx page loaded.

nginx page

And that's it, you just have successfully run your first container on docker. You can play around now with different images.

Похожее
Apr 18, 2024
Author: Michael Shpilt
One of the most used databases these days is PostgreSQL (aka Postgres). Its accomplishments include being the most popular DB [among professional developers] according to Stack Overflow survey of 2022, the database in all of the fastest TechEmpower benchmarks, and...
Jul 18, 2024
Author: Vinod Pal
In today’s fast-paced business environment, efficiency and responsiveness are crucial for maintaining a competitive edge. Background batch processing plays a pivotal role in achieving these goals by handling time-consuming tasks asynchronously, thereby freeing up system resources and ensuring a seamless...
Jul 10, 2021
Author: Sam Walpole
I've recently gotten into using Docker in my development cycle and I'm really enjoying how much of a wonderful tool it is. One thing that always used to be a pain was setting up a development server to run SQL...
Feb 13
Author: Faraz Kelhini
Table of contents Is Axios better than fetch()? Understanding the basic syntax of Axios and fetch() Backward compatibility Response timeouts in Axios vs. fetch() Automatic JSON data transformation HTTP interceptors Download progress with Axios vs. fetch() Making simultaneous requests How...
Написать сообщение
Тип
Почта
Имя
*Сообщение