wtsi-hgi / docker-proxify

Allows building and running docker container images from behind a corporate proxy
84 stars 16 forks source link

Second run that starts almost immediatly after the previous run fails: #3

Open josephwinston opened 10 years ago

josephwinston commented 10 years ago

docker version:

vagrant-ubuntu-trusty-64:~ docker --version
Docker version 1.3.0, build c78088f

Verify that nothing is running:

vagrant-ubuntu-trusty-64:~ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

docker-proxify is on the VM running 14.04:

vagrant-ubuntu-trusty-64:~ docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
jpetazzo/nsenter          latest              f95c04697ce2        12 hours ago        359.7 MB
jrandall/docker-proxify   latest              d5a2e624a7a9        3 months ago        586.4 MB

Start the container a second time:

vagrant-ubuntu-trusty-64:~ docker run -i -t --privileged -e http_proxy -e https_proxy jrandall/docker-proxify
Linking cgroup systemd to name=systemd
Waiting for docker daemon to be ready.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Wait a while and everything works:

vagrant-ubuntu-trusty-64:~ docker run -i -t --privileged -e http_proxy -e https_proxy jrandall/docker-proxify
Linking cgroup systemd to name=systemd
Waiting for docker daemon to be ready...................... docker ready.
root@418762f601c8:/docker# exit

Note:

$ docker rm -f `docker ps -a -q`

does not allow the next invocation of docker-proxify to work correctly. Like before, you must wait a while.

jrandall commented 10 years ago

I've just tried this numerous times on my system and cannot reproduce it. What I've been trying is to start one docker-proxify (docker run -i -t --privileged -e http_proxy -e https_proxy jrandall/docker-proxify) and then in another terminal on the same server, start a second one a few seconds later using the same command. In all my ~10 tests, the second version has started just fine. I've even tried switching very quickly before the first one completely starts, and I haven't been able to reproduce the very long wait for the docker daemon to be ready.

Can you reliably reproduce this?

jrandall commented 10 years ago

I don't have Docker 1.3.0 installed to test with (I'm now testing with 1.2.0), so it is possible this is a new issue with that version.

josephwinston commented 10 years ago

I can easily reproduce this on an up to date 14.04 with docker 1.3.0.

This includes doing the following:

$ docker rm -f `docker ps -a -q`
$ docker rmi -f `docker images -q `

before running down jrandall/docker-proxify