Monday, November 20, 2023

Docker 5

Docker for Windows

Docker has out-of-the-box support for Windows, but you need to have the following configuration in order to install Docker for Windows.

System Requirements

Windows OSWindows 10 64 bit
Memory2 GB RAM (recommended)

You can download Docker for Windows from − https://docs.docker.com/get-docker/


  1. Double-click Docker Desktop Installer.exe to run the installer.

  2. When prompted, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected or not depending on your choice of backend.

    If your system only supports one of the two options, you will not be able to select which backend to use.

  3. Follow the instructions on the installation wizard to authorize the installer and proceed with the install.

  4. When the installation is successful, select Close to complete the installation process.

  5. If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Sign out and sign back in for the changes to take effect.


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 application for which the shortcut is created on the desktop when the installation of Docker toolbox is carried out.

Quickstart Terminal

Next, you will see the configuration being carried out when Docker toolbox is launched.

Docker Toolbox Terminal

Once done, you will see Docker configured and launched. You will get an interactive shell for Docker.

Interactive Shell

To test that Docker runs properly, we can use the Docker run command to download and run a simple HelloWorld Docker container.

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 −

Docker Container


No comments:

Post a Comment

Thank you for visiting my blog

Kubernetes

Prerequisites We assume anyone who wants to understand Kubernetes should have an understating of how the Docker works, how the Docker images...