DEV Community

Navneet Karnani
Navneet Karnani

Posted on • Originally published at blog.mandraketech.in on

Installing Docker for Windows Home for Standard User

As a learning requirement during my internship recently, I was required to learn the use of Docker. Now there will be people like me, who are new to the concept of what Docker is, this is how it is explained on the Amazon Web Services page for Docker.

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardised units called containers with everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into any environment and know your code will run.

While setting up docker Windows Home, I ran into a few issues in getting docker to run. After a lot of debugging, I realised that the issue I was facing was because I was using a standard user as opposed to the system administrator.

Why Should You Use a Standard User on Windows Home?

A standard account has no power, while an admin account can do anything. So why would you want to use a standard account? That's a good question, and the answer is that it's because it lacks power. We are human. We are going to make a mistake sooner or later. In an admin account, we could end up ruining something crucial very easily, or maybe even make the entire computer unbootable.

However, a standard account won't have such issues due to the lack of power. Additionally, this account will also stop malicious programs like malware from damaging your Windows system.

So if you don't already use a separate standard user account on your computer, this is your sign to start.

Setting Up Docker Desktop

The first step in setting up Docker is to install Docker Desktop. After downloading and running the correct version of the Docker installer, follow the steps to completely install it. You can follow this guide to install it, or use this one to install it backend on WSL 2. Once you are done with the basic steps, is where the debugging comes in.

To check whether docker has been properly installed, type 'cmd' in your Windows search bar and run your Command Line as administrator. Enter the following command.

docker version
Enter fullscreen mode Exit fullscreen mode

If your output looks like this:

Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:29:54 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.31.1 (153621)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:22 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
Enter fullscreen mode Exit fullscreen mode

Then docker is working fine. If not, then it can have one of many fixes.

Changing User Type

If you are a standard user, as recommended earlier, you will need to give yourself the required permissions to be able to use Docker.

To check if you have the required permissions, press [WINDOWS + R] and enter 'netplwiz'. This will take you to the Advanced User Accounts Control Panel. Here you will be able to see your user type. If you don't aren't part of the 'docker-users' group, here is the fix for it.

Open up the command line as an administrator, and enter the following command.

net localgroup docker-users "user-id" /ADD
Enter fullscreen mode Exit fullscreen mode

Your "user-id" is your local windows username, and can be found by looking at the folder name under C:\Users\ .

Now when you go back to Advanced User Accounts Control Panel, docker-users should be added as a group for your user account.

Enabling Docker Daemon

If while using docker, you get an error message like the one shown below:

Client:
 Version:      1.13.0-dev
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   d8d3314
 Built:        Tue Nov  1 03:05:34 2016
 OS/Arch:      windows/amd64
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/version: open //./pipe/docker_engine: The system cannot find the file
specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
Enter fullscreen mode Exit fullscreen mode

In the case of this error, open up the Docker Desktop app and go to the settings page. Check the box which says 'Expose daemon on tcp://localhost:2375 without TLS', and then apply the changes before trying again.

If you have followed all of these steps, then you should now be able to use Docker properly.

This article was originally published at: https://blog.mandraketech.in/installing-docker-for-windows-home-for-standard-user

Top comments (0)