I can confirm that I was adding the vagrant user to the docker group but 
this did not solve the issue. Adding sticky bit to /usr/bin/docker fixed 
the issue. More details can be found at:

http://stackoverflow.com/questions/34677042/vagrant-and-docker-provider

Thanks to all who have offered support.

On Friday, 8 January 2016 11:59:22 UTC, Richard O'flynn wrote:
>
> My environment:
>
> OS-X 10.9.4
> VirtualBox 5.012 r104815
> Vagrant 1.7.4
>
> Trying to use docker provider, with the guest VM being geerlingguy/centos7
>
> I can run docker containers from hub but when I try to build docker 
> container from Dockerfile I get:
>
> Command: "docker" "build" 
> "/var/lib/docker/docker_build_1b35c3f0278e1a3b37d1578d7ce326e5"
>
> Stderr:
>
> Stdout: unable to prepare context: unable to evaluate symlinks in context 
> path: lstat /var/lib/docker/docker_build_1b35c3f0278e1a3b37d1578d7ce326e5: 
> permission denied
>
>
> If I vagrant ssh into centos7 host and run
>
> docker build /var/lib/docker/docker_build_1b35c3f0278e1a3b37d1578d7ce326e5 
>
> I see same error but if I run
>
> sudo docker build 
> /var/lib/docker/docker_build_1b35c3f0278e1a3b37d1578d7ce326e5 
>
> the build runs.
>
> I tried:
>
>  config.ssh.username = 'root'
>  config.ssh.password = 'vagrant'
>  config.ssh.insert_key = 'true'
>
> for host machine but then it doesn't find docker command.
>
> I have been banging my head for 2 days - reading all sorts about symlink 
> issues in virtualbox and tried all sorts of different settings.
>
> Can anybody advise how I should resolve this.
>
> Thanks.
>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/e86bb69e-1e80-466c-8286-81488315bf08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to