riki
riki

Reputation: 2393

Error building Docker image in Windows 7

New to docker and I'm using Windows 7 SP1. It looks like docker is running fine in my machine as I have tried running hello-world by command docker run hello-world as instructed in the tutorial and got expected result. Now all I'm trying to do is create a docker image for a .net core console app. My app built and ran. but while building docker image by command docker build -t myapp . I get the below error

error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&c puquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t= duke&target=&ulimits=null: 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.

Below my Dockerfile

FROM microsoft/dotnet:1.1-runtime-nanoserver

WORKDIR /DotNetConsole
COPY /bin/Debug/netcoreapp1.1/publish/ .

ENTRYPOINT ["dotnet", "DotNetConsole.dll"]

Upvotes: 1

Views: 396

Answers (1)

sboisse
sboisse

Reputation: 5498

I could get around this problem by starting the "Docker QuickStart Terminal" installed with the docker tools, and running the commands for building the docker images from there.

If I used GIT BASH instead of the Docker QuickStart Terminal to execute the commands, I would get this kind of error. So it seems that if the commands are not executed from the Docker terminal itself, these errors show up.

Upvotes: 1

Related Questions