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:
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.
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.