Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on "Sending build context to Docker daemon" #576

Closed
PetaPetaPeta opened this issue Mar 13, 2017 · 5 comments
Closed

Stuck on "Sending build context to Docker daemon" #576

PetaPetaPeta opened this issue Mar 13, 2017 · 5 comments

Comments

@PetaPetaPeta
Copy link

PetaPetaPeta commented Mar 13, 2017

Expected behavior

I have an container that should have a build context of 32 mb. When I run docker build . I expect the container to be built.

Actual behavior

When I run docker build . it is stuck on Sending build context to Docker daemon 1.114 MB. I have tried with the same image(private image) on a different laptop, but under the same setup and the result is the same. I have tr

Information

  • Diagnostic id: 690837A7-0988-4B89-B557-7EFCE92C6352/2017-03-13_13-47-44
  • I am running this on Windows 10 with the newest version of Docker for Windows on the edge channel. The command is being run from "Bash on Ubuntu on Windows". It is set up with DOCKER_HOST=tcp://127.0.0.1:2375.
  • Output of docker version:
Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        Thu Aug 18 17:52:38 2016
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: true

Steps to reproduce the behavior

  1. mkdir src
  2. dd if=/dev/zero of=src/output.dat bs=32M count=1
  3. Create a Dockerfile with contents:
FROM ubuntu:14.04

COPY src/ /opt
  1. docker build .
@PetaPetaPeta
Copy link
Author

I just attempted to update to the latest version on docker on unix such that server and client matches.

Client:                                                                                                                                                                                                                               [9/1680] Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:57:58 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: true

This gives me the following:

➜  docker docker build .
Sending build context to Docker daemon 557.1 kB

@PetaPetaPeta
Copy link
Author

PetaPetaPeta commented Mar 13, 2017

I have found this thread which seems to document some of the same issues, but without a solution.
It should be noted that if I create a docker-compose.yml-file and try to build from there it functions as expected. Here is a small snippet from the log.txt-file after running both docker build . and docker-compose build:

[14:12:18.696][ApiProxy       ][Info   ] proxy >> GET /_ping
[14:12:18.696][ApiProxy       ][Info   ] Dial Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:18.697][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:18.698][ApiProxy       ][Info   ] proxy << GET /_ping
[14:12:18.701][ApiProxy       ][Info   ] proxy >> POST /v1.26/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&ulimits=null
[14:12:18.701][ApiProxy       ][Info   ] Dial Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:18.702][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:30.199][ApiProxy       ][Info   ] proxy >> POST /v1.21/build?q=False&pull=False&t=docker_test&nocache=False&forcerm=False&rm=True
[14:12:30.199][ApiProxy       ][Info   ] Dial Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:30.200][ApiProxy       ][Info   ] Successfully dialed Hyper-V socket b7f71aee-22b3-4d18-aa32-10936e7cc282:23a432c2-537a-4291-bcb5-d62504644739
[14:12:30.592][ApiProxy       ][Info   ] proxy << POST /v1.21/build?q=False&pull=False&t=docker_test&nocache=False&forcerm=False&rm=True

The docker client seems to use the v1.26 API which the docker-compose client uses the v1.21 client. Could this be a regression with a new API version?

@friism
Copy link

friism commented Mar 15, 2017

I think this is a known bug in WSL: microsoft/WSL#1123 (comment)

Fwiw I can't repro on my latest insider build so it's possible that they fixed it:

C:\Users\Michael Friis> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      15055  0
friism@LAPTOP-G8D4BRBC:~/repro/build-hang$ docker -H localhost:2375 build .
Sending build context to Docker daemon 33.56 MB
Step 1/2 : FROM ubuntu:14.04
 ---> 7c09e61e9035
Step 2/2 : COPY . /test
 ---> 676c3ca04b6e
Removing intermediate container 4581324384df
Successfully built 676c3ca04b6e
friism@LAPTOP-G8D4BRBC:~/repro/build-hang$

@ArthurZ
Copy link

ArthurZ commented Sep 24, 2018

In my case a co-worker advised to assign more runnable memory to Docker which helped.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants