Packer Docker Builder with remote docker daemon

0 votes
I'm using packer docker builder with ansible to create docker image

when I execute packer docker to build the image, it errors out saying:

   docker: Run command: docker run -v /root/.packer.d/tmp/packer-docker612435850:/packer-files -d -i -t ubuntu:latest /bin/bash

==> docker: Error running container: Docker exited with a non-zero exit status.

==> docker: Stderr: docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

==> docker: See 'docker run --help'.
Aug 1, 2018 in Docker by Hannah
• 14,080 points
102 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Packers Docker builder doesn't work with remote hosts since packer uses the /packer-filesvolume mount to communicate with the container. This is vaguely expressed in the docs with:

The Docker builder must run on a machine that has Docker installed.
answered Aug 1, 2018 by Kalgi
• 35,800 points

Related Questions In Docker

0 votes
1 answer

build an J2EE application with docker

I would suggest you to use volume ...READ MORE

answered May 1, 2018 in Docker by shubham
• 6,500 points
30 views
0 votes
1 answer

Docker ports are working on the localhost but not with public ip

Probably, the reason is that you've included ...READ MORE

answered Jun 12, 2018 in Docker by Damon Salvatore
• 5,270 points

edited Oct 15, 2018 by Kalgi 174 views
0 votes
1 answer

Isolate PHP applications with Docker

Here is what you can try. You ...READ MORE

answered Jul 6, 2018 in Docker by Atul
• 10,200 points
27 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points
60 views
0 votes
1 answer

How can I expose more than 1 port with Docker?

To expose just one port, this is ...READ MORE

answered Jul 25, 2018 in Docker by Kalgi
• 35,800 points
20 views
0 votes
1 answer

How can I expose more than 1 port with Docker?

To expose just one port, this is ...READ MORE

answered Jul 27, 2018 in Docker by Kalgi
• 35,800 points
17 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.