How to Solve Error Message Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified when running Docker command

Posted on

Introduction

There is an error appear when executing a specific command using docker tool. This article will show how to solve an error message appear when executing a command using docker tool. The following are the error command appear upon executing a docker command :

C:\mydocker-build>docker build --tag hello-world:latest .
Sending build context to Docker daemon 5.632kB
Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified.

C:\mydocker-build>

So, there is an error appear exist as in the above docker command execution. In this context, the docker command execution itself is in a PC, laptop or any machine running using a Microsoft Windows operating system. More specific, it is running using Windows 10 as its operating system. Furthermore, there is already a running Docker Desktop service in it.

Solution

This article has a connection with the previous article. That article is an article with the title of ‘How to Solve Error Message error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect when running Docker command’ and it exist in this link. The situation where the error appear is in the following description :

  1. First of all, planning on to shut down the machine or the Windows 10 device but end in failure. It is in a screensaver mode with the machine or the Windows 10 device locked.

  2. After logging in to the machine or the Windows 10 device, try to execute the docker command. First of all, there is an error appear as exist in the article with the title of ‘How to Solve Error Message error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect when running Docker command’ in this link. Solve the error is easy, just run the Docker Desktop application.

  3. But after running the Docker Desktop application, there is an additional error appear. It appear as in the introduction part. Actually, the solution is very easy. Just make sure that the Docker Desktop application has already running properly. In order to check if the Docker Desktop application is running properly, there are two ways to do that. Those are in the following :

    1. Just check the Docker Desktop application. Make sure it is already showing the main display. When the command execution in the introduction part appear with an error, the loading process of the Docker Desktop application is not finish. The following image is displaying the loading process of the Docker Desktop application :

      How to Solve Error Message Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified when running Docker command
      How to Solve Error Message Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified when running Docker command
    2. Another way is by checking the Docker Desktop service. Just type ‘service’ in the search field in the PC or laptop, execute the Services window dialog. Check the ‘Docker Desktop service in the list of the Services window dialog. Make sure that it is running as in the following image :

      How to Solve Error Message Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified when running Docker command
      How to Solve Error Message Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified when running Docker command
  4. After that, just execute the command once more. If there are no more errors, the command will run successfully as follows :

    C:\mydocker-build>docker build --tag hello-world:latest .
    [+] Building 8.7s (5/5) FINISHED
    => [internal] load build definition from Dockerfile 0.1s
    => => transferring dockerfile: 313B 0.0s
    => [internal] load .dockerignore 0.1s
    => => transferring context: 2B 0.0s
    => [internal] load metadata for 127.0.0.1:5000/centos:latest 0.7s
    => [1/1] FROM 127.0.0.1:5000/centos@sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc 7.8s
    => => resolve 127.0.0.1:5000/centos@sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc 0.0s
    => => sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc 529B / 529B 0.0s
    => => sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6 2.14kB / 2.14kB 0.0s
    => => sha256:a1d0c75327776413fa0db9ed3adcdbadedc95a662eb1d360dad82bb913f8a1d1 83.52MB / 83.52MB 1.9s
    => => extracting sha256:a1d0c75327776413fa0db9ed3adcdbadedc95a662eb1d360dad82bb913f8a1d1 5.5s
    => exporting to image 0.0s
    => => exporting layers 0.0s
    => => writing image sha256:22773018c04267669821153cd42ef21101902b10a8a16f340fbef85a77821d03 0.0s
    => => naming to docker.io/library/hello-world:latest 0.0s
    
    Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
    
    C:\mydocker-build>
    

Leave a Reply