You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM centos
MAINTAINER Fly MacPara noreply@some.domain
RUN yum install -y openssh-server
RUN mkdir /var/run/sshd
CMD "/usr/sbin/sshd -D"
The command "docker build --no-cache=true --rm=true -t mycontainer" . on CoreOS runs fine. The new image is created.
Running the same docker build remotely against the docker daemon in CoreOS using the latest docker py ends in a failure. The code is like this:
c = docker.Client(base_url='http://172.16.116.199:4243', version='1.9', timeout=10)
print c.build(path='context', tag='mycontainer', nocache=True, rm=True)
The docker logs on CoreOS show:
May 27 05:53:15 localhost docker[3062]: [debug] buildfile.go:195 Command to be executed: [/bin/sh -c yum install -y openssh-server]
May 27 05:53:15 localhost docker[3062]: [e4e292ea] +job allocate_interface(e7369d464279fe75cd0e77081cb5832e9d09c0417533ca67719fc7dfc91473f8)
May 27 05:53:15 localhost docker[3062]: [debug] attach.go:59 attach: stdout: begin
May 27 05:53:15 localhost docker[3062]: [debug] attach.go:97 attach: stderr: begin
May 27 05:53:15 localhost docker[3062]: [debug] attach.go:143 attach: waiting for job 1/2
May 27 05:53:15 localhost docker[3062]: [e4e292ea] -job allocate_interface(e7369d464279fe75cd0e77081cb5832e9d09c0417533ca67719fc7dfc91473f8) = OK (0)
May 27 05:53:16 localhost docker[3062]: [error] attach.go:73 attach: stdout: write tcp 172.16.116.200:52015: connection reset by peer
May 27 05:53:16 localhost docker[3062]: [debug] attach.go:76 attach: stdout: end
May 27 05:53:16 localhost docker[3062]: [error] attach.go:145 attach: job 1 returned error write tcp 172.16.116.200:52015: connection reset by peer, aborting all jobs
May 27 05:53:16 localhost docker[3062]: [debug] attach.go:114 attach: stderr: end
May 27 05:53:16 localhost docker[3062]: write tcp 172.16.116.200:52015: connection reset by peer
May 27 05:53:16 localhost docker[3062]: [e4e292ea] -job build() = ERR (1)
Why? Why is the remote build failing whereas the local build succeeds? When I take out the line "RUN yum ..." in the Dockerfile above, the remote docker build runs and the container is created.
Looking at the logs more closely I now see that the IP address in the "connection reset by peer" is the IP address from the client that runs docker py function c.build.
Activity
eembsen commentedon May 27, 2014
Looking at the logs more closely I now see that the IP address in the "connection reset by peer" is the IP address from the client that runs docker py function c.build.
eembsen commentedon May 27, 2014
BTW, logged the same issue in the docker project (moby/moby#6050) because I do not know which end is causing the trouble.
[-]Remote docker build (on CoreOS) fails on "RUN yum ..."[/-][+]Remote docker build fails on "RUN yum ..."[/+]mpetazzoni commentedon May 27, 2014
Could it be a timeout issue? What if you have
RUN sleep 11in your Dockerfile?eembsen commentedon May 28, 2014
I played around with timeout settings but AFAIK that has no effect on the outcome.
shin- commentedon Jun 20, 2014
Tried reproducing this today with Docker 1.0 and the current master but I didn't encounter the issue again. Are you still seeing this?
shin- commentedon Jul 22, 2014
Closing, feel free to reopen if you're still seeing the issue with docker-py>=0.3.2 :)
Update Dockerfile