in linux

you can use -v to share folders between host and VM.

packer is trying to do:
-v /var/folders/j4/nqyjdv994637sq_l7_d9465h0000gn/T/packer-
docker306353473:/packer-files

Can you test manually some -v ?

As is today, it seems packer expect -v to work.

Alvaro.

On Fri, Nov 18, 2016 at 5:35 PM, Doug Garstang <[email protected]> wrote:

> All,
>
> I'm trying to use the docker builder for packer on a mac. My packer
> template contains:
>
> {
>   "builders":[{
>     "type": "docker",
>     "image": "ubuntu",
>     "pull": false,
>     "export_path": "image.tar"
>   }],
>   "provisioners":[
>     {
>       "type": "shell",
>       "inline": ["apt-get -y update; apt-get install -y curl"]
>     }
>   ]
> }
>
> When I run 'packer build packer.json', I get the following failure, which
> I've cut down on for brevity.
>
> ==> docker: Creating a temporary directory for sharing data...
> ==> docker: Starting docker container...
>     docker: Run command: docker run -v /var/folders/j4/nqyjdv994637sq_l7_
> d9465h0000gn/T/packer-docker306353473:/packer-files -d -i -t ubuntu
> /bin/bash
> ==> docker: Error running container: Docker exited with a non-zero exit
> status.
> ==> docker: Stderr: docker: Error response from daemon: Mounts denied:
> -for-mac/osxfs/#namespaces for more info.
> ==> docker: .
> ==> docker: sq_l7_d9465h0000gn/T/packer-docker306353473
> ==> docker: is not shared from OS X and is not known to Docker.
> ==> docker: You can configure shared paths from Docker -> Preferences...
> -> File Sharing.
> ==> docker: See https://docs.docker.com/docker.
> ==> docker:
> Build 'docker' errored: Error running container: Docker exited with a
> non-zero exit status.
> Stderr: docker: Error response from daemon: Mounts denied:
> -for-mac/osxfs/#namespaces for more info.
> .
> sq_l7_d9465h0000gn/T/packer-docker306353473
> is not shared from OS X and is not known to Docker.
> You can configure shared paths from Docker -> Preferences... -> File
> Sharing.
> See https://docs.docker.com/docker.
>
> So... why? The message "Mounts denied: -for-mac/osxfs/#namespaces for more
> info" isn't even grammatically correct english.
>
>  Packer version is latest 0.12.0. Docker version is latest beta. Also
> tried with latest stable docker 1.12.3.
>
> The docker preferences show /Users, /Volumes, /tmp and /private. The /var
> directory is a symlink to /var/private.
>
> Thanks,
> Doug.
>
> --
> 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/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" 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/packer-tool/26b575e6-3c31-4799-8648-285a113f0fd9%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/26b575e6-3c31-4799-8648-285a113f0fd9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
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/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" 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/packer-tool/CAHqq0eyFgAwbXdWPpvw5BQ-kdx0wXziY78jnpgDXaAGAF4%3D0rA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to