Closed ozbillwang closed 5 years ago
I'm not sure I have enough info to help based off the information provided but I'd love to know if the 2.0.0 version of this plugin solves this issue? If you are using docker-ce and and one of the more recent builds of docker I believe I've sorted out this issue. I'd love know for sure though, so please do try installing the newest release and report back.
For your convenience I've implemented the docker feature in th into the 2.0.0 release of this plugin based of these docs https://docs.docker.com/network/proxy/#configure-the-docker-client
Thanks @rlaveycal
I got new error now
root@94082d0cf3d5:/# docker pull alpine
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I can access internet in dind
root@ubuntu-xenial:~# docker exec -ti 94 bash
root@94082d0cf3d5:/# curl -s -I www.google.com
HTTP/1.1 200 OK
Date: Wed, 09 Jan 2019 05:45:26 GMT
Expires: -1
Cache-Control: private, max-age=0
P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."
I can pull image on vagrant box
root@94082d0cf3d5:/# exit
exit
vagrant@ubuntu-xenial:~$ docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
cd784148e348: Pull complete
Digest: sha256:46e71df1e5191ab8b8034c5189e325258ec44ea739bba1e5645cff83c9048ff1
Status: Downloaded newer image for alpine:latest
vagrant@ubuntu-xenial:~$
Hello - I'm sorry to hear that you are still having problems with docker in docker inside of Vagrant. I've honestly not had much experience doing docker in docker and I'm not sure that the way this was originally implemented will support this setup. I remember trying to get it to work but ran into issues but I cannot remember specific issue however. :(
I do know that using the docker provider does work if docker-ce is installed on the vagrant VM and you fire off a container inside that VM. I've also implemented support for the docker client to use the newer features of docker so that you don't have to use docker run --env http_proxy....
according to the docs I provided in my last response.
But yeah if you can share your Vagrantfile and how you have docker setup as well as how you are provisioning your container it might help. I cannot promise a fix but I'll do the best I can to help.
the Vagrantfile is
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.proxy.http = "http://10.0.2.2:8079"
config.proxy.https = "http://10.0.2.2:8079"
config.proxy.ftp = "http://10.0.2.2:8079"
config.proxy.no_proxy = "localhost,127.0.0.*,10.*,192.168.*,*.local"
end
Thank you for sending this along.
I am making some assumptions that you are firing up this ubuntu box, then installing docker-ce manually inside the VM? If so, could you please provide a gist of all the steps you take to get docker installed inside this vagrant box? Without this information I cannot provide much help.
No further information received and I cannot reproduce this behavior. Closing this issue.
Thanks to make this plugin, I can run docker in vagrant behind corporate's proxy.
But there is a project I used, I need run docker in docker (dind), I found I can't access registry server properly
Any hints for me? I run with
./dind-cluster-v1.11.sh up
By the way, internet access is fine