Shell scripts broken with Docker 1.4.x #1752

Closed
pleschev opened this Issue Dec 12, 2014 · 85 comments

Comments

Projects
None yet
@pleschev
Contributor

pleschev commented Dec 12, 2014

Using the current source version of packer

Working scenario using docker 1.3.3:

2014/12/12 15:49:51 packer-builder-docker: 2014/12/12 15:49:51 Running the provision hook
1418399391,,ui,message,    docker: Container ID: b0117b8cbffd154539242acb24666f703b78ff22ef782e0d03cc768ba38db982
2014/12/12 15:49:51 packer-provisioner-shell: 2014/12/12 15:49:51 Opening /tmp/packer-shell648686173 for reading
2014/12/12 15:49:51 packer-provisioner-shell: 2014/12/12 15:49:51 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:49:51 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:49:51 packer-builder-docker: 2014/12/12 15:49:51 Executing in container b0117b8cbffd154539242acb24666f703b78ff22ef782e0d03cc768ba38db982: "(cp /packer-files/upload080199707 /tmp/script.sh) >/packer-files/cmd466238654 2>&1; echo $? >/packer-files/cmd466238654-exit"
1418399391,,ui,say,==> docker: Provisioning with shell script: /tmp/packer-shell648686173
2014/12/12 15:49:53 packer-builder-docker: 2014/12/12 15:49:53 Waiting for exit code to appear for remote command...
2014/12/12 15:49:53 packer-builder-docker: 2014/12/12 15:49:53 Executed command exit status: 0
2014/12/12 15:49:55 packer-builder-docker: 2014/12/12 15:49:55 Executing in container b0117b8cbffd154539242acb24666f703b78ff22ef782e0d03cc768ba38db982: "(chmod 0777 /tmp/script.sh) >/packer-files/cmd678804741 2>&1; echo $? >/packer-files/cmd678804741-exit"
2014/12/12 15:49:57 packer-builder-docker: 2014/12/12 15:49:57 Waiting for exit code to appear for remote command...
2014/12/12 15:49:57 packer-builder-docker: 2014/12/12 15:49:57 Executed command exit status: 0
2014/12/12 15:49:59 packer-builder-docker: 2014/12/12 15:49:59 [INFO] RPC endpoint: Communicator ended with: 0
2014/12/12 15:49:59 [INFO] RPC client: Communicator ended with: 0
2014/12/12 15:49:59 [INFO] RPC endpoint: Communicator ended with: 0
2014/12/12 15:49:59 packer-provisioner-shell: 2014/12/12 15:49:59 [INFO] RPC client: Communicator ended with: 0
2014/12/12 15:49:59 packer-builder-docker: 2014/12/12 15:49:59 Executing in container b0117b8cbffd154539242acb24666f703b78ff22ef782e0d03cc768ba38db982: "(chmod +x /tmp/script.sh; PACKER_BUILD_NAME='docker' PACKER_BUILDER_TYPE='docker' /tmp/script.sh) >/packer-files/cmd838923936 2>&1; echo $? >/packer-files/cmd838923936-exit"
2014/12/12 15:50:01 packer-builder-docker: 2014/12/12 15:50:01 Waiting for exit code to appear for remote command...
2014/12/12 15:50:02 packer-builder-docker: 2014/12/12 15:50:02 Executed command exit status: 127
2014/12/12 15:50:03 packer-builder-docker: 2014/12/12 15:50:03 [INFO] RPC endpoint: Communicator ended with: 127
2014/12/12 15:50:03 [INFO] 0 bytes written for 'stderr'
2014/12/12 15:50:03 [INFO] RPC client: Communicator ended with: 127
2014/12/12 15:50:03 [INFO] 0 bytes written for 'stdout'
2014/12/12 15:50:03 [INFO] RPC endpoint: Communicator ended with: 127
2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] 0 bytes written for 'stderr'
2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] RPC client: Communicator ended with: 127
2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] 0 bytes written for 'stdout'

Failing scenario using docker 1.4:

1418398765,,ui,say,==> docker: Provisioning with shell script: /tmp/packer-shell348099556
2014/12/12 15:39:25 packer-provisioner-shell: 2014/12/12 15:39:25 Opening /tmp/packer-shell348099556 for reading
2014/12/12 15:39:25 packer-provisioner-shell: 2014/12/12 15:39:25 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:25 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:25 packer-builder-docker: 2014/12/12 15:39:25 Executing in container ff13b288d87f7fa9d3c1e5ffeb810cc8fec6be80b1bd8eab21cc39a8e2b22336: "(cp /packer-files/upload431013147 /tmp/script.sh) >/packer-files/cmd669791166 2>&1; echo $? >/packer-files/cmd669791166-exit"
2014/12/12 15:39:27 packer-provisioner-shell: 2014/12/12 15:39:27 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1
2014/12/12 15:39:29 packer-provisioner-shell: 2014/12/12 15:39:29 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:29 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:29 packer-builder-docker: 2014/12/12 15:39:29 Executing in container ff13b288d87f7fa9d3c1e5ffeb810cc8fec6be80b1bd8eab21cc39a8e2b22336: "(cp /packer-files/upload047296517 /tmp/script.sh) >/packer-files/cmd706862496 2>&1; echo $? >/packer-files/cmd706862496-exit"
2014/12/12 15:39:31 packer-provisioner-shell: 2014/12/12 15:39:31 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1
2014/12/12 15:39:33 packer-provisioner-shell: 2014/12/12 15:39:33 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:33 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:33 packer-builder-docker: 2014/12/12 15:39:33 Executing in container ff13b288d87f7fa9d3c1e5ffeb810cc8fec6be80b1bd8eab21cc39a8e2b22336: "(cp /packer-files/upload033689215 /tmp/script.sh) >/packer-files/cmd209553362 2>&1; echo $? >/packer-files/cmd209553362-exit"
2014/12/12 15:39:35 packer-provisioner-shell: 2014/12/12 15:39:35 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1
2014/12/12 15:39:37 packer-provisioner-shell: 2014/12/12 15:39:37 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:37 [INFO] 109 bytes written for 'uploadData'
2014/12/12 15:39:37 packer-builder-docker: 2014/12/12 15:39:37 Executing in container ff13b288d87f7fa9d3c1e5ffeb810cc8fec6be80b1bd8eab21cc39a8e2b22336: "(cp /packer-files/upload479277833 /tmp/script.sh) >/packer-files/cmd622516948 2>&1; echo $? >/packer-files/cmd622516948-exit"
2014/12/12 15:39:39 packer-provisioner-shell: 2014/12/12 15:39:39 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1
2014/12/12 15:39:41 packer-provisioner-shell: 2014/12/12 15:39:41 [INFO] 109 bytes written for 'uploadData'
@diranged

This comment has been minimized.

Show comment
Hide comment
@diranged

diranged Dec 16, 2014

Just a followup.. when this was failing, it was using docker 1.4.0 from the latest docker repos. I just got it to work with this modified Vagrantfile:

Vagrant.configure("2") do |config|
  #config.vm.box = "phusion-open-ubuntu-14.04-amd64"
  #config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
  config.vm.box = "ubuntu"

  config.vm.provider :virtualbox do |vb|
    vb.name = 'packer-builder'
    vb.customize ["modifyvm", :id, "--memory", "2048" ]
    vb.customize ["modifyvm", :id, "--cpus",  "2" ]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end

  if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
    pkg_cmd = ""
    #pkg_cmd << "wget -q -O - https://get.docker.io/gpg | apt-key add -; "
    #pkg_cmd << "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;"
    pkg_cmd << "apt-get update -qq; apt-get install -q -y --force-yes docker.io bsdtar; "
    pkg_cmd << "usermod -a -G docker vagrant; "
    pkg_cmd << "cd /usr/bin; wget -qO- https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip | bsdtar -pxvf-; "
    pkg_cmd << "sudo chmod +x /usr/bin/packer*; "
    config.vm.provision :shell, :inline => pkg_cmd
  end
end

This installs Docker 1.0.1 ... and it works perfectly with the same Packer files.

Just a followup.. when this was failing, it was using docker 1.4.0 from the latest docker repos. I just got it to work with this modified Vagrantfile:

Vagrant.configure("2") do |config|
  #config.vm.box = "phusion-open-ubuntu-14.04-amd64"
  #config.vm.box_url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
  config.vm.box = "ubuntu"

  config.vm.provider :virtualbox do |vb|
    vb.name = 'packer-builder'
    vb.customize ["modifyvm", :id, "--memory", "2048" ]
    vb.customize ["modifyvm", :id, "--cpus",  "2" ]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end

  if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
    pkg_cmd = ""
    #pkg_cmd << "wget -q -O - https://get.docker.io/gpg | apt-key add -; "
    #pkg_cmd << "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list;"
    pkg_cmd << "apt-get update -qq; apt-get install -q -y --force-yes docker.io bsdtar; "
    pkg_cmd << "usermod -a -G docker vagrant; "
    pkg_cmd << "cd /usr/bin; wget -qO- https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip | bsdtar -pxvf-; "
    pkg_cmd << "sudo chmod +x /usr/bin/packer*; "
    config.vm.provision :shell, :inline => pkg_cmd
  end
end

This installs Docker 1.0.1 ... and it works perfectly with the same Packer files.

@diranged

This comment has been minimized.

Show comment
Hide comment
@diranged

diranged Dec 16, 2014

Working Docker Version:

Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

Non-Working:

Client version: 1.4.0
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 4595d4f
OS/Arch (client): linux/amd64
Server version: 1.4.0
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 4595d4f

Working Docker Version:

Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

Non-Working:

Client version: 1.4.0
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 4595d4f
OS/Arch (client): linux/amd64
Server version: 1.4.0
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 4595d4f
@diranged

This comment has been minimized.

Show comment
Hide comment
@diranged

diranged Dec 16, 2014

Ok final update for the night ... it looks like Docker 1.4.0 is the issue. Docker 1.3.3 works fine:

Client version: 1.3.3
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): d344625
OS/Arch (client): linux/amd64
Server version: 1.3.3
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): d344625

Ok final update for the night ... it looks like Docker 1.4.0 is the issue. Docker 1.3.3 works fine:

Client version: 1.3.3
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): d344625
OS/Arch (client): linux/amd64
Server version: 1.3.3
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): d344625
@pleschev

This comment has been minimized.

Show comment
Hide comment
@pleschev

pleschev Dec 16, 2014

Contributor

it looks like Docker 1.4.0 is the issue. Docker 1.3.3 works fine:

Yup, that's the conclusion I came up with too

Contributor

pleschev commented Dec 16, 2014

it looks like Docker 1.4.0 is the issue. Docker 1.3.3 works fine:

Yup, that's the conclusion I came up with too

@pleschev

This comment has been minimized.

Show comment
Hide comment
@pleschev

pleschev Dec 17, 2014

Contributor

Confirmed that this is still a problem when using Docker 1.4.1

Contributor

pleschev commented Dec 17, 2014

Confirmed that this is still a problem when using Docker 1.4.1

@pleschev pleschev changed the title from Inline scripts broken with Docker 1.4 to Inline scripts broken with Docker 1.4.x Dec 17, 2014

@pleschev

This comment has been minimized.

Show comment
Hide comment
@pleschev

pleschev Dec 17, 2014

Contributor

json file that recreates the problem:

{
  "builders": [
    {
      "type": "docker",
      "image": "ubuntu:latest",
      "pull": true,
      "export_path": "docker-burn.tar"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": [
        "set -x",
        "set -e",
        "date"
      ]
    }
  ]
}
Contributor

pleschev commented Dec 17, 2014

json file that recreates the problem:

{
  "builders": [
    {
      "type": "docker",
      "image": "ubuntu:latest",
      "pull": true,
      "export_path": "docker-burn.tar"
    }
  ],
  "provisioners": [
    {
      "type": "shell",
      "inline": [
        "set -x",
        "set -e",
        "date"
      ]
    }
  ]
}
@ernoaapa

This comment has been minimized.

Show comment
Hide comment
@ernoaapa

ernoaapa Dec 19, 2014

👍 same here!

👍 same here!

@mariussturm

This comment has been minimized.

Show comment
Hide comment
@mariussturm

mariussturm Dec 19, 2014

A naive fix would look like this:

mariussturm@3a286ab

This breaks backwards compatibility with Docker 1.3- (what is ok imo)

A naive fix would look like this:

mariussturm@3a286ab

This breaks backwards compatibility with Docker 1.3- (what is ok imo)

@logankoester

This comment has been minimized.

Show comment
Hide comment
@logankoester

logankoester Dec 23, 2014

@mariussturm Thanks for 3a286ab. There is a related problem with the chef-solo provisioner; the first command it runs (creating the staging_directory) kills the container, thus ending the build. Your solution resolves that as well.

@mariussturm Thanks for 3a286ab. There is a related problem with the chef-solo provisioner; the first command it runs (creating the staging_directory) kills the container, thus ending the build. Your solution resolves that as well.

@soupdiver

This comment has been minimized.

Show comment
Hide comment
@soupdiver

soupdiver Dec 25, 2014

I also can confirm this problem with Docker 1.4.1

I also can confirm this problem with Docker 1.4.1

@pythianliappis

This comment has been minimized.

Show comment
Hide comment
@pythianliappis

pythianliappis Dec 25, 2014

I am having the same issue (reported here when using inline) also when using the script element.
So essentially right now it is impossible to build docker v1.4.x images with packer with any of the shell provisioners.

The error is:

2014/12/25 12:21:30 packer-builder-docker: 2014/12/25 12:21:30 Executing in container 600d9cc40feaa99ee3f6b9ad6daf440dc79265abbbfa8676a45904463df1a353: "(cp /packer-files/upload674827840 /tmp/script.sh) >/packer-files/cmd940924575 2>&1; echo $? >/packer-files/cmd940924575-exit"
==> docker: Provisioning with shell script: /home/dl/testsourcedir/hello.sh
2014/12/25 12:21:32 packer-provisioner-shell: 2014/12/25 12:21:32 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1

With a provisioner configuration like:

 "provisioners" : [
    {
        "type" : "shell",
        "script" : "{{pwd}}/testsourcedir/hello.sh"
    }
    ],

and a corresponding simple shell script:

[dl@localhost ~]$ cat testsourcedir/hello.sh
#!/bin/sh
echo "Hello"

I am having the same issue (reported here when using inline) also when using the script element.
So essentially right now it is impossible to build docker v1.4.x images with packer with any of the shell provisioners.

The error is:

2014/12/25 12:21:30 packer-builder-docker: 2014/12/25 12:21:30 Executing in container 600d9cc40feaa99ee3f6b9ad6daf440dc79265abbbfa8676a45904463df1a353: "(cp /packer-files/upload674827840 /tmp/script.sh) >/packer-files/cmd940924575 2>&1; echo $? >/packer-files/cmd940924575-exit"
==> docker: Provisioning with shell script: /home/dl/testsourcedir/hello.sh
2014/12/25 12:21:32 packer-provisioner-shell: 2014/12/25 12:21:32 Retryable error: Error uploading script: Upload failed with non-zero exit status: 1

With a provisioner configuration like:

 "provisioners" : [
    {
        "type" : "shell",
        "script" : "{{pwd}}/testsourcedir/hello.sh"
    }
    ],

and a corresponding simple shell script:

[dl@localhost ~]$ cat testsourcedir/hello.sh
#!/bin/sh
echo "Hello"
@elliot42

This comment has been minimized.

Show comment
Hide comment
@elliot42

elliot42 Dec 26, 2014

+1, with the script variant of the shell provisioner.

+1, with the script variant of the shell provisioner.

@pleschev pleschev changed the title from Inline scripts broken with Docker 1.4.x to Shell scripts broken with Docker 1.4.x Dec 30, 2014

@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Dec 30, 2014

+1
This provisioner has failed for me with the inline variant of the shell provisioner.

packer version
Packer v0.7.5
...
docker --version
Docker version 1.4.1, build 5bc2ff8

+1
This provisioner has failed for me with the inline variant of the shell provisioner.

packer version
Packer v0.7.5
...
docker --version
Docker version 1.4.1, build 5bc2ff8
@iansmith

This comment has been minimized.

Show comment
Hide comment
@iansmith

iansmith Dec 31, 2014

Based on the comments above (and the commit by @mariussturm) I built a virtual box box that you can use with boot2docker and it has marius' change baked into packer provided. This required the source to packer and @mitchellh's Vagrantfile for packer (hacked to build a 32 bit binary) as well @YungSang's source code for how to build a vagrant box from boot2docker's iso. Open source to the rescue!

Hope this helps some folks who want to use docker 1.4.1 with packer inside a vagrant.

https://atlas.hashicorp.com/iansmith/boxes/boot2docker-plus-packer

Based on the comments above (and the commit by @mariussturm) I built a virtual box box that you can use with boot2docker and it has marius' change baked into packer provided. This required the source to packer and @mitchellh's Vagrantfile for packer (hacked to build a 32 bit binary) as well @YungSang's source code for how to build a vagrant box from boot2docker's iso. Open source to the rescue!

Hope this helps some folks who want to use docker 1.4.1 with packer inside a vagrant.

https://atlas.hashicorp.com/iansmith/boxes/boot2docker-plus-packer

@peterloron

This comment has been minimized.

Show comment
Hide comment
@peterloron

peterloron Feb 7, 2015

Urgh! Just ran into this one. Serious wrench in the gears for my project.

Urgh! Just ran into this one. Serious wrench in the gears for my project.

@vitorcoxta

This comment has been minimized.

Show comment
Hide comment
@vitorcoxta

vitorcoxta Feb 9, 2015

I also ran into this issue. What is the current workaround? Downgrade docker to 1.3.3?

I also ran into this issue. What is the current workaround? Downgrade docker to 1.3.3?

@yanaga

This comment has been minimized.

Show comment
Hide comment
@yanaga

yanaga Feb 9, 2015

I had to downgrade docker to 1.3.3. That's my current workaround.

yanaga commented Feb 9, 2015

I had to downgrade docker to 1.3.3. That's my current workaround.

@pythianliappis

This comment has been minimized.

Show comment
Hide comment
@pythianliappis

pythianliappis Feb 9, 2015

@vitorcoxta and @yanaga Alternatively you can rebuilt a packer binary version of your own using the fix proposed by mariussturm:

3a286ab

@vitorcoxta and @yanaga Alternatively you can rebuilt a packer binary version of your own using the fix proposed by mariussturm:

3a286ab

@Lawouach

This comment has been minimized.

Show comment
Hide comment
@Lawouach

Lawouach Feb 13, 2015

With the new docker 1.5, it seems unfortunate we still have to use 1.3.3 due to this bug :/

With the new docker 1.5, it seems unfortunate we still have to use 1.3.3 due to this bug :/

@peterloron

This comment has been minimized.

Show comment
Hide comment
@peterloron

peterloron Feb 13, 2015

Any ETA on getting this rolled into a new release? 0.76, maybe?

Any ETA on getting this rolled into a new release? 0.76, maybe?

@ksclarke

This comment has been minimized.

Show comment
Hide comment

👍

@chiefy

This comment has been minimized.

Show comment
Hide comment
@chiefy

chiefy Feb 14, 2015

Having this issue with:

Docker version 1.5.0, build a8a31ef
Packer v0.7.5
Boot2Docker-cli version: v1.5.0
Git commit: ccd9032

Darwin 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64

chiefy commented Feb 14, 2015

Having this issue with:

Docker version 1.5.0, build a8a31ef
Packer v0.7.5
Boot2Docker-cli version: v1.5.0
Git commit: ccd9032

Darwin 13.4.0 Darwin Kernel Version 13.4.0: Wed Dec 17 19:05:52 PST 2014; root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64
@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Feb 15, 2015

I've created a github repo , https://github.com/stefancocora/packer-issue1752-fix , that contains packer binaries (amd64) built against the master branch with mariussturm fix for this issue.
You can use the binaries I've built up to the point when the packer maintainers merge the fix for this issue and release a new version.
The binaries I've built work flawlesly for me, I've added a way to test them in the aformentioned github repo, see README.md

I've created a github repo , https://github.com/stefancocora/packer-issue1752-fix , that contains packer binaries (amd64) built against the master branch with mariussturm fix for this issue.
You can use the binaries I've built up to the point when the packer maintainers merge the fix for this issue and release a new version.
The binaries I've built work flawlesly for me, I've added a way to test them in the aformentioned github repo, see README.md

@ankon

This comment has been minimized.

Show comment
Hide comment
@ankon

ankon Feb 20, 2015

Contributor

@stefancocora thanks a lot for the repository! I can confirm that that version works (on Fedora 21/x86_64, with docker 1.5.0).

One thing I noticed with the use of exec instead of attach: it would be nice to also use the -t flag, so that a tty is allocated, and tools like sudo work (CentOS by default has Defaults requiretty in /etc/sudoers).

Contributor

ankon commented Feb 20, 2015

@stefancocora thanks a lot for the repository! I can confirm that that version works (on Fedora 21/x86_64, with docker 1.5.0).

One thing I noticed with the use of exec instead of attach: it would be nice to also use the -t flag, so that a tty is allocated, and tools like sudo work (CentOS by default has Defaults requiretty in /etc/sudoers).

@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Feb 21, 2015

Thanks for testing @ankon , good point about -t , didn't think about it.
I've just created a packer binary compiled for docker with the -t flag.
Unfortunately it fails to build an image and I don't know what is causing that failure.
Reverting packer to the patch without -t I get a successful docker image build.

Error output from packer build with -t

...
    docker: Status: Image is up to date for devopsil/puppet:latest
==> docker: Starting docker container...
    docker: Run command: docker run -v /tmp/packer-docker141026721:/packer-files -d -i -t devopsil/puppet /bin/bash
    docker: Container ID: 72e09e8c029a7321143cac4baf012525e1a816e35770a1cc216327005caf1912
==> docker: Uploading ./modules => /tmp/modules
==> docker: Killing the container: 72e09e8c029a7321143cac4baf012525e1a816e35770a1cc216327005caf1912
Build 'docker' errored: Upload failed with non-zero exit status: 1

==> Some builds didn't complete successfully and had errors:
--> docker: Upload failed with non-zero exit status: 1

==> Builds finished but no artifacts were created.

You can always disable requiretty in the sudoers file and that will allow sudo to work fine.

Thanks for testing @ankon , good point about -t , didn't think about it.
I've just created a packer binary compiled for docker with the -t flag.
Unfortunately it fails to build an image and I don't know what is causing that failure.
Reverting packer to the patch without -t I get a successful docker image build.

Error output from packer build with -t

...
    docker: Status: Image is up to date for devopsil/puppet:latest
==> docker: Starting docker container...
    docker: Run command: docker run -v /tmp/packer-docker141026721:/packer-files -d -i -t devopsil/puppet /bin/bash
    docker: Container ID: 72e09e8c029a7321143cac4baf012525e1a816e35770a1cc216327005caf1912
==> docker: Uploading ./modules => /tmp/modules
==> docker: Killing the container: 72e09e8c029a7321143cac4baf012525e1a816e35770a1cc216327005caf1912
Build 'docker' errored: Upload failed with non-zero exit status: 1

==> Some builds didn't complete successfully and had errors:
--> docker: Upload failed with non-zero exit status: 1

==> Builds finished but no artifacts were created.

You can always disable requiretty in the sudoers file and that will allow sudo to work fine.

@chiefy

This comment has been minimized.

Show comment
Hide comment
@chiefy

chiefy Feb 23, 2015

@stefancocora I compiled w/ the patch for OSX if you want I can submit a PR w/ a branch. For now if anyone wants them here they are.

chiefy commented Feb 23, 2015

@stefancocora I compiled w/ the patch for OSX if you want I can submit a PR w/ a branch. For now if anyone wants them here they are.

@thatarchguy

This comment has been minimized.

Show comment
Hide comment
@thatarchguy

thatarchguy Feb 24, 2015

@stefancocora Your repo works for Arch x86_64 with docker 1.5.0. Thank you

@stefancocora Your repo works for Arch x86_64 with docker 1.5.0. Thank you

@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Feb 24, 2015

@chiefy don't worry about a PR, I'm hoping my build for linux and your build for osx won't have to exist for long. I'm hoping that this gets fixed in the upstream packer code soon ...

@chiefy don't worry about a PR, I'm hoping my build for linux and your build for osx won't have to exist for long. I'm hoping that this gets fixed in the upstream packer code soon ...

@chiefy

This comment has been minimized.

Show comment
Hide comment
@chiefy

chiefy Feb 24, 2015

@stefancocora 👍 yeah, i concur.

chiefy commented Feb 24, 2015

@stefancocora 👍 yeah, i concur.

@nchammas

This comment has been minimized.

Show comment
Hide comment
@nchammas

nchammas Feb 25, 2015

Contributor

+1

I'm seeing this issue as well.

$ packer version
Packer v0.7.5

$ docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
Contributor

nchammas commented Feb 25, 2015

+1

I'm seeing this issue as well.

$ packer version
Packer v0.7.5

$ docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
@kikitux

This comment has been minimized.

Show comment
Hide comment
@thmttch

This comment has been minimized.

Show comment
Hide comment
@thmttch

thmttch May 21, 2015

+1

This is a pretty serious blocker for anybody who wants to do docker+chef. I can't possibly recommend this for my team if it requires patching what feels like half the toolchain.

thmttch commented May 21, 2015

+1

This is a pretty serious blocker for anybody who wants to do docker+chef. I can't possibly recommend this for my team if it requires patching what feels like half the toolchain.

@jamescarr

This comment has been minimized.

Show comment
Hide comment
@jamescarr

jamescarr May 21, 2015

It actually impacts a number of pieces when using the docker builder.
Fortunately the patch works.

On Thu, May 21, 2015 at 5:57 PM, Matt Chu notifications@github.com wrote:

+1

This is a pretty serious blocker for anybody who wants to do docker+chef.
I can't possibly recommend this for my team if it requires patching what
feels like half the toolchain.


Reply to this email directly or view it on GitHub
#1752 (comment).

It actually impacts a number of pieces when using the docker builder.
Fortunately the patch works.

On Thu, May 21, 2015 at 5:57 PM, Matt Chu notifications@github.com wrote:

+1

This is a pretty serious blocker for anybody who wants to do docker+chef.
I can't possibly recommend this for my team if it requires patching what
feels like half the toolchain.


Reply to this email directly or view it on GitHub
#1752 (comment).

@gsaslis

This comment has been minimized.

Show comment
Hide comment
@gsaslis

gsaslis May 22, 2015

Contributor

i am also blocked on using docker + chef, like @thmttch ..
i hope the maintainers can get round to merging it in soon (the fact that they haven't worries me that they might have another solution in mind altogether?)

Contributor

gsaslis commented May 22, 2015

i am also blocked on using docker + chef, like @thmttch ..
i hope the maintainers can get round to merging it in soon (the fact that they haven't worries me that they might have another solution in mind altogether?)

@logicminds

This comment has been minimized.

Show comment
Hide comment
@logicminds

logicminds May 28, 2015

just ran into this as well. Will try the patch as a workaround. Using docker-machine and docker 1.6.2

just ran into this as well. Will try the patch as a workaround. Using docker-machine and docker 1.6.2

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 29, 2015

Member

Fixed!

Member

mitchellh commented May 29, 2015

Fixed!

@mitchellh mitchellh closed this May 29, 2015

@tizzo

This comment has been minimized.

Show comment
Hide comment
@tizzo

tizzo May 29, 2015

THANK YOU @mitchellh!!!! I was about to retire packer in favor of Docerkfiles (shudder) because this was breaking my deployment. You continue to be one of my constant heroes saving me hours and hours of my life.

tizzo commented May 29, 2015

THANK YOU @mitchellh!!!! I was about to retire packer in favor of Docerkfiles (shudder) because this was breaking my deployment. You continue to be one of my constant heroes saving me hours and hours of my life.

@gsaslis

This comment has been minimized.

Show comment
Hide comment
@gsaslis

gsaslis May 29, 2015

Contributor

AWESOME!! \m/
Thanks!!

On 29 May 2015 at 20:56, Mitchell Hashimoto notifications@github.com
wrote:

Closed #1752 #1752.


Reply to this email directly or view it on GitHub
#1752 (comment).

Contributor

gsaslis commented May 29, 2015

AWESOME!! \m/
Thanks!!

On 29 May 2015 at 20:56, Mitchell Hashimoto notifications@github.com
wrote:

Closed #1752 #1752.


Reply to this email directly or view it on GitHub
#1752 (comment).

@aphexddb

This comment has been minimized.

Show comment
Hide comment
@aphexddb

aphexddb May 29, 2015

Huge help, thanks!

Huge help, thanks!

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh May 29, 2015

Member

I apologize for the long delay :( We'll get a Packer release out very shortly with lots of Docker bug fixes.

Member

mitchellh commented May 29, 2015

I apologize for the long delay :( We'll get a Packer release out very shortly with lots of Docker bug fixes.

@gsaslis

This comment has been minimized.

Show comment
Hide comment
@gsaslis

gsaslis May 29, 2015

Contributor

fantastic news! will be looking forward to that ;)

Contributor

gsaslis commented May 29, 2015

fantastic news! will be looking forward to that ;)

@thmttch

This comment has been minimized.

Show comment
Hide comment
@thmttch

thmttch May 29, 2015

Thanks! Been looking forward to this!

thmttch commented May 29, 2015

Thanks! Been looking forward to this!

@xrow

This comment has been minimized.

Show comment
Hide comment
@xrow

xrow Jun 3, 2015

@mitchellh When is the next release planned that includes this fix?

xrow commented Jun 3, 2015

@mitchellh When is the next release planned that includes this fix?

@aidanjl

This comment has been minimized.

Show comment
Hide comment
@aidanjl

aidanjl Jun 3, 2015

@stefancocora Thanks for interim fix!

aidanjl commented Jun 3, 2015

@stefancocora Thanks for interim fix!

@lynchc

This comment has been minimized.

Show comment
Hide comment
@lynchc

lynchc Jun 3, 2015

awesome guys. Great work!

lynchc commented Jun 3, 2015

awesome guys. Great work!

@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Jun 4, 2015

@aidanjl no problem , it is the least I could do to make @mariussturm fix easily accessible for anybody !

@aidanjl no problem , it is the least I could do to make @mariussturm fix easily accessible for anybody !

@sterburg

This comment has been minimized.

Show comment
Hide comment
@sterburg

sterburg Jun 9, 2015

@mitchellh please upgrade the packer that Atlas is using with this fix too, because currently i cannot build any docker images in Atlas. I need this to demo Atlas to my manager this thursday for we can buy Atlas.

sterburg commented Jun 9, 2015

@mitchellh please upgrade the packer that Atlas is using with this fix too, because currently i cannot build any docker images in Atlas. I need this to demo Atlas to my manager this thursday for we can buy Atlas.

@rvangundy

This comment has been minimized.

Show comment
Hide comment
@rvangundy

rvangundy Jun 19, 2015

I'm currently running Packer 0.8-dev and Docker 1.6.2 on OS X and still seeing this issue.

==> docker: Provisioning with shell script: /var/folders/7z/3_4h7g_x55b_stn8nyd2w4mc0000gn/T/packer-shell921079459
2015/06/19 15:13:00 packer-provisioner-shell: 2015/06/19 15:13:00 [INFO] 92 bytes written for 'uploadData'
2015/06/19 15:13:00 [INFO] 92 bytes written for 'uploadData'
2015/06/19 15:13:00 packer-builder-docker: 2015/06/19 15:13:00 Executing in container b77320622ccd70b787bf85e0d88680db0a8a29ea4946aad7d18ceb7dc181362c: "(command cp /packer-files/upload556204673 /tmp/script_7943.sh) >/packer-files/cmd576371692 2>&1; echo $? >/packer-files/cmd576371692-exit"
2015/06/19 15:13:02 packer-builder-docker: 2015/06/19 15:13:02 Waiting for exit code to appear for remote command...

I've also tried downgrading to Docker 1.3.3 and encountering the same thing.

I'm currently running Packer 0.8-dev and Docker 1.6.2 on OS X and still seeing this issue.

==> docker: Provisioning with shell script: /var/folders/7z/3_4h7g_x55b_stn8nyd2w4mc0000gn/T/packer-shell921079459
2015/06/19 15:13:00 packer-provisioner-shell: 2015/06/19 15:13:00 [INFO] 92 bytes written for 'uploadData'
2015/06/19 15:13:00 [INFO] 92 bytes written for 'uploadData'
2015/06/19 15:13:00 packer-builder-docker: 2015/06/19 15:13:00 Executing in container b77320622ccd70b787bf85e0d88680db0a8a29ea4946aad7d18ceb7dc181362c: "(command cp /packer-files/upload556204673 /tmp/script_7943.sh) >/packer-files/cmd576371692 2>&1; echo $? >/packer-files/cmd576371692-exit"
2015/06/19 15:13:02 packer-builder-docker: 2015/06/19 15:13:02 Waiting for exit code to appear for remote command...

I've also tried downgrading to Docker 1.3.3 and encountering the same thing.

@dfarrell07

This comment has been minimized.

Show comment
Hide comment
@dfarrell07

dfarrell07 Jun 24, 2015

Packer v0.8.0 was tagged and released to the downloads page yesterday, which should actually fix this. It's working for me with Docker 1.5.0, after upgrading Packer 0.7.5 to 0.8.0.

Packer v0.8.0 was tagged and released to the downloads page yesterday, which should actually fix this. It's working for me with Docker 1.5.0, after upgrading Packer 0.7.5 to 0.8.0.

@jacyzon

This comment has been minimized.

Show comment
Hide comment

jacyzon commented Jun 24, 2015

@stefancocora

This comment has been minimized.

Show comment
Hide comment
@stefancocora

stefancocora Jun 24, 2015

verified and working correctly with Packer v0.8.0 and docker Client version: 1.6.2 on an Ubuntu 14.04 x64 host.

verified and working correctly with Packer v0.8.0 and docker Client version: 1.6.2 on an Ubuntu 14.04 x64 host.

@lukeowen89

This comment has been minimized.

Show comment
Hide comment
@lukeowen89

lukeowen89 Jun 29, 2015

I'm still experiencing this issue on osx. Packer version 0.8.0, docker version 1.6.2 and 1.7.0. Will have a go on a linux distro to see if I have any more luck.

I'm still experiencing this issue on osx. Packer version 0.8.0, docker version 1.6.2 and 1.7.0. Will have a go on a linux distro to see if I have any more luck.

@claco

This comment has been minimized.

Show comment
Hide comment
@claco

claco Jul 2, 2015

Same as @lukeowen89
Kind of a drag I still can't packer on osx at this point.

claco commented Jul 2, 2015

Same as @lukeowen89
Kind of a drag I still can't packer on osx at this point.

@bobzoller

This comment has been minimized.

Show comment
Hide comment
@bobzoller

bobzoller Jul 16, 2015

Also broken for me on OSX. Packer 0.8.1, Docker 1.7.1

packer debug log

2015/07/15 23:42:08 [INFO] Packer version: 0.8.1  872e78d5b0a387eb3b87ddeef210264c3199d178+CHANGES
2015/07/15 23:42:08 Packer Target OS/Arch: darwin amd64
2015/07/15 23:42:08 Built with Go Version: go1.4.2
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-chroot = /usr/local/bin/packer-builder-amazon-chroot
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-ebs = /usr/local/bin/packer-builder-amazon-ebs
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-instance = /usr/local/bin/packer-builder-amazon-instance
2015/07/15 23:42:08 [DEBUG] Discovered plugin: digitalocean = /usr/local/bin/packer-builder-digitalocean
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker = /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 [DEBUG] Discovered plugin: file = /usr/local/bin/packer-builder-file
2015/07/15 23:42:08 [DEBUG] Discovered plugin: googlecompute = /usr/local/bin/packer-builder-googlecompute
2015/07/15 23:42:08 [DEBUG] Discovered plugin: null = /usr/local/bin/packer-builder-null
2015/07/15 23:42:08 [DEBUG] Discovered plugin: openstack = /usr/local/bin/packer-builder-openstack
2015/07/15 23:42:08 [DEBUG] Discovered plugin: parallels-iso = /usr/local/bin/packer-builder-parallels-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: parallels-pvm = /usr/local/bin/packer-builder-parallels-pvm
2015/07/15 23:42:08 [DEBUG] Discovered plugin: qemu = /usr/local/bin/packer-builder-qemu
2015/07/15 23:42:08 [DEBUG] Discovered plugin: virtualbox-iso = /usr/local/bin/packer-builder-virtualbox-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: virtualbox-ovf = /usr/local/bin/packer-builder-virtualbox-ovf
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vmware-iso = /usr/local/bin/packer-builder-vmware-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vmware-vmx = /usr/local/bin/packer-builder-vmware-vmx
2015/07/15 23:42:08 [DEBUG] Discovered plugin: atlas = /usr/local/bin/packer-post-processor-atlas
2015/07/15 23:42:08 [DEBUG] Discovered plugin: compress = /usr/local/bin/packer-post-processor-compress
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-import = /usr/local/bin/packer-post-processor-docker-import
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-push = /usr/local/bin/packer-post-processor-docker-push
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-save = /usr/local/bin/packer-post-processor-docker-save
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-tag = /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vagrant = /usr/local/bin/packer-post-processor-vagrant
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vagrant-cloud = /usr/local/bin/packer-post-processor-vagrant-cloud
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vsphere = /usr/local/bin/packer-post-processor-vsphere
2015/07/15 23:42:08 [DEBUG] Discovered plugin: ansible-local = /usr/local/bin/packer-provisioner-ansible-local
2015/07/15 23:42:08 [DEBUG] Discovered plugin: chef-client = /usr/local/bin/packer-provisioner-chef-client
2015/07/15 23:42:08 [DEBUG] Discovered plugin: chef-solo = /usr/local/bin/packer-provisioner-chef-solo
2015/07/15 23:42:08 [DEBUG] Discovered plugin: file = /usr/local/bin/packer-provisioner-file
2015/07/15 23:42:08 [DEBUG] Discovered plugin: powershell = /usr/local/bin/packer-provisioner-powershell
2015/07/15 23:42:08 [DEBUG] Discovered plugin: puppet-masterless = /usr/local/bin/packer-provisioner-puppet-masterless
2015/07/15 23:42:08 [DEBUG] Discovered plugin: puppet-server = /usr/local/bin/packer-provisioner-puppet-server
2015/07/15 23:42:08 [DEBUG] Discovered plugin: salt-masterless = /usr/local/bin/packer-provisioner-salt-masterless
2015/07/15 23:42:08 [DEBUG] Discovered plugin: shell = /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 [DEBUG] Discovered plugin: shell-local = /usr/local/bin/packer-provisioner-shell-local
2015/07/15 23:42:08 [DEBUG] Discovered plugin: windows-restart = /usr/local/bin/packer-provisioner-windows-restart
2015/07/15 23:42:08 [DEBUG] Discovered plugin: windows-shell = /usr/local/bin/packer-provisioner-windows-shell
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Attempting to open config file: /Users/bob/.packerconfig
2015/07/15 23:42:08 [WARN] Config file doesn't exist: /Users/bob/.packerconfig
2015/07/15 23:42:08 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/usr/local/bin/packer-builder-digitalocean googlecompute:/usr/local/bin/packer-builder-googlecompute virtualbox-ovf:/usr/local/bin/packer-builder-virtualbox-ovf amazon-instance:/usr/local/bin/packer-builder-amazon-instance vmware-vmx:/usr/local/bin/packer-builder-vmware-vmx amazon-chroot:/usr/local/bin/packer-builder-amazon-chroot null:/usr/local/bin/packer-builder-null vmware-iso:/usr/local/bin/packer-builder-vmware-iso openstack:/usr/local/bin/packer-builder-openstack parallels-iso:/usr/local/bin/packer-builder-parallels-iso parallels-pvm:/usr/local/bin/packer-builder-parallels-pvm qemu:/usr/local/bin/packer-builder-qemu virtualbox-iso:/usr/local/bin/packer-builder-virtualbox-iso amazon-ebs:/usr/local/bin/packer-builder-amazon-ebs docker:/usr/local/bin/packer-builder-docker file:/usr/local/bin/packer-builder-file] PostProcessors:map[atlas:/usr/local/bin/packer-post-processor-atlas docker-tag:/usr/local/bin/packer-post-processor-docker-tag vagrant-cloud:/usr/local/bin/packer-post-processor-vagrant-cloud vsphere:/usr/local/bin/packer-post-processor-vsphere compress:/usr/local/bin/packer-post-processor-compress docker-import:/usr/local/bin/packer-post-processor-docker-import docker-push:/usr/local/bin/packer-post-processor-docker-push docker-save:/usr/local/bin/packer-post-processor-docker-save vagrant:/usr/local/bin/packer-post-processor-vagrant] Provisioners:map[shell-local:/usr/local/bin/packer-provisioner-shell-local windows-shell:/usr/local/bin/packer-provisioner-windows-shell ansible-local:/usr/local/bin/packer-provisioner-ansible-local chef-client:/usr/local/bin/packer-provisioner-chef-client file:/usr/local/bin/packer-provisioner-file salt-masterless:/usr/local/bin/packer-provisioner-salt-masterless shell:/usr/local/bin/packer-provisioner-shell chef-solo:/usr/local/bin/packer-provisioner-chef-solo powershell:/usr/local/bin/packer-provisioner-powershell puppet-masterless:/usr/local/bin/packer-provisioner-puppet-masterless puppet-server:/usr/local/bin/packer-provisioner-puppet-server windows-restart:/usr/local/bin/packer-provisioner-windows-restart]}
2015/07/15 23:42:08 Setting cache directory: /Users/bob/Projects/garbanzo/packer_cache
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Loading builder: docker
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-builder-docker []string{"/usr/local/bin/packer-builder-docker"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin389384987
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 Loading provisioner: shell
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-provisioner-shell []string{"/usr/local/bin/packer-provisioner-shell"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin592962254
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 Loading post-processor: docker-tag
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-post-processor-docker-tag []string{"/usr/local/bin/packer-post-processor-docker-tag"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin099680253
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 ui: docker output will be in this color.
2015/07/15 23:42:08 ui: 
2015/07/15 23:42:08 Build debug mode: false
2015/07/15 23:42:08 Force build: false
2015/07/15 23:42:08 Preparing build: docker
docker output will be in this color.

2015/07/15 23:42:08 Waiting on builds to complete...
2015/07/15 23:42:08 Starting build run: docker
2015/07/15 23:42:08 Running builder: docker
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 [DEBUG] Docker version: 1.7.1
2015/07/15 23:42:08 ui: ==> docker: Creating a temporary directory for sharing data...
==> docker: Creating a temporary directory for sharing data...
2015/07/15 23:42:08 ui: ==> docker: Pulling Docker image: gliderlabs/herokuish
==> docker: Pulling Docker image: gliderlabs/herokuish
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Executing: /usr/local/bin/docker [pull gliderlabs/herokuish]
2015/07/15 23:42:11 ui:     docker: latest: Pulling from gliderlabs/herokuish
    docker: latest: Pulling from gliderlabs/herokuish
2015/07/15 23:42:11 ui:     docker: 835c565d00e2: Already exists
    docker: 835c565d00e2: Already exists
2015/07/15 23:42:11 ui:     docker: c5c659229e15: Already exists
    docker: c5c659229e15: Already exists
2015/07/15 23:42:11 ui:     docker: 9a8403cd4d99: Already exists
    docker: 9a8403cd4d99: Already exists
2015/07/15 23:42:11 ui:     docker: 89fc314a0a6e: Already exists
    docker: 89fc314a0a6e: Already exists
2015/07/15 23:42:11 ui:     docker: d257698c42c5: Already exists
    docker: d257698c42c5: Already exists
2015/07/15 23:42:11 ui:     docker: c6c6baedb602: Already exists
    docker: c6c6baedb602: Already exists
2015/07/15 23:42:11 ui:     docker: c6c6baedb602: Already exists
    docker: c6c6baedb602: Already exists
2015/07/15 23:42:11 ui:     docker: Digest: sha256:4b08475f91eaccceb40fcbb5e0c43a992257b1bdedbf86f2777f458da9a0e2cd
2015/07/15 23:42:11 ui:     docker: Status: Image is up to date for gliderlabs/herokuish:latest
    docker: Digest: sha256:4b08475f91eaccceb40fcbb5e0c43a992257b1bdedbf86f2777f458da9a0e2cd
    docker: Status: Image is up to date for gliderlabs/herokuish:latest
2015/07/15 23:42:11 ui: ==> docker: Starting docker container...
==> docker: Starting docker container...
2015/07/15 23:42:11 ui:     docker: Run command: docker run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Starting container with args: [run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash]
    docker: Run command: docker run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Waiting for container to finish starting
2015/07/15 23:42:11 ui:     docker: Container ID: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
    docker: Container ID: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Running the provision hook
2015/07/15 23:42:11 ui: ==> docker: Provisioning with shell script: /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589
2015/07/15 23:42:11 packer-provisioner-shell: 2015/07/15 23:42:11 Opening /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589 for reading
==> docker: Provisioning with shell script: /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589
2015/07/15 23:42:11 packer-provisioner-shell: 2015/07/15 23:42:11 [INFO] 44 bytes written for 'uploadData'
2015/07/15 23:42:11 [INFO] 44 bytes written for 'uploadData'
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Executing in container cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16: "(command cp /packer-files/upload803520517 /tmp/script_7943.sh) >/packer-files/cmd416685472 2>&1; echo $? >/packer-files/cmd416685472-exit"
2015/07/15 23:42:13 packer-builder-docker: 2015/07/15 23:42:13 Waiting for exit code to appear for remote command...
^C
2015/07/15 23:50:00 Closing stdin because interrupt received.
2015/07/15 23:50:00 Stopping build: docker
2015/07/15 23:50:00 packer-post-processor-docker-tag: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-provisioner-shell: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-builder-docker: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-builder-docker: 2015/07/15 23:50:00 Cancelling the step runner...
2015/07/15 23:50:01 packer-builder-docker: 2015/07/15 23:50:01 Cancelling provisioning due to interrupt...
2015/07/15 23:50:01 Provisioner.Cancel err: unexpected EOF
2015/07/15 23:50:01 /usr/local/bin/packer-provisioner-shell: plugin process exited
2015/07/15 23:50:01 ui: ==> docker: Killing the container: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
==> docker: Killing the container: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
2015/07/15 23:50:01 Build cancelled: docker
2015/07/15 23:50:01 ui: Build 'docker' finished.
2015/07/15 23:50:01 Builds completed. Waiting on interrupt barrier...
2015/07/15 23:50:01 ui: Cleanly cancelled builds after being interrupted.
2015/07/15 23:50:01 waiting for all plugin processes to complete...
Build 'docker' finished.
Cleanly cancelled builds after being interrupted.
2015/07/15 23:50:01 /usr/local/bin/packer-post-processor-docker-tag: plugin process exited
2015/07/15 23:50:01 /usr/local/bin/packer-builder-docker: plugin process exited

poked around on the container before I killed it:

$ ls /packer-files
cmd416685472       cmd416685472-exit
$ cat /packer-files/cmd416685472
cp: cannot stat '/packer-files/upload803520517': No such file or directory

Also broken for me on OSX. Packer 0.8.1, Docker 1.7.1

packer debug log

2015/07/15 23:42:08 [INFO] Packer version: 0.8.1  872e78d5b0a387eb3b87ddeef210264c3199d178+CHANGES
2015/07/15 23:42:08 Packer Target OS/Arch: darwin amd64
2015/07/15 23:42:08 Built with Go Version: go1.4.2
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-chroot = /usr/local/bin/packer-builder-amazon-chroot
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-ebs = /usr/local/bin/packer-builder-amazon-ebs
2015/07/15 23:42:08 [DEBUG] Discovered plugin: amazon-instance = /usr/local/bin/packer-builder-amazon-instance
2015/07/15 23:42:08 [DEBUG] Discovered plugin: digitalocean = /usr/local/bin/packer-builder-digitalocean
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker = /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 [DEBUG] Discovered plugin: file = /usr/local/bin/packer-builder-file
2015/07/15 23:42:08 [DEBUG] Discovered plugin: googlecompute = /usr/local/bin/packer-builder-googlecompute
2015/07/15 23:42:08 [DEBUG] Discovered plugin: null = /usr/local/bin/packer-builder-null
2015/07/15 23:42:08 [DEBUG] Discovered plugin: openstack = /usr/local/bin/packer-builder-openstack
2015/07/15 23:42:08 [DEBUG] Discovered plugin: parallels-iso = /usr/local/bin/packer-builder-parallels-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: parallels-pvm = /usr/local/bin/packer-builder-parallels-pvm
2015/07/15 23:42:08 [DEBUG] Discovered plugin: qemu = /usr/local/bin/packer-builder-qemu
2015/07/15 23:42:08 [DEBUG] Discovered plugin: virtualbox-iso = /usr/local/bin/packer-builder-virtualbox-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: virtualbox-ovf = /usr/local/bin/packer-builder-virtualbox-ovf
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vmware-iso = /usr/local/bin/packer-builder-vmware-iso
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vmware-vmx = /usr/local/bin/packer-builder-vmware-vmx
2015/07/15 23:42:08 [DEBUG] Discovered plugin: atlas = /usr/local/bin/packer-post-processor-atlas
2015/07/15 23:42:08 [DEBUG] Discovered plugin: compress = /usr/local/bin/packer-post-processor-compress
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-import = /usr/local/bin/packer-post-processor-docker-import
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-push = /usr/local/bin/packer-post-processor-docker-push
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-save = /usr/local/bin/packer-post-processor-docker-save
2015/07/15 23:42:08 [DEBUG] Discovered plugin: docker-tag = /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vagrant = /usr/local/bin/packer-post-processor-vagrant
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vagrant-cloud = /usr/local/bin/packer-post-processor-vagrant-cloud
2015/07/15 23:42:08 [DEBUG] Discovered plugin: vsphere = /usr/local/bin/packer-post-processor-vsphere
2015/07/15 23:42:08 [DEBUG] Discovered plugin: ansible-local = /usr/local/bin/packer-provisioner-ansible-local
2015/07/15 23:42:08 [DEBUG] Discovered plugin: chef-client = /usr/local/bin/packer-provisioner-chef-client
2015/07/15 23:42:08 [DEBUG] Discovered plugin: chef-solo = /usr/local/bin/packer-provisioner-chef-solo
2015/07/15 23:42:08 [DEBUG] Discovered plugin: file = /usr/local/bin/packer-provisioner-file
2015/07/15 23:42:08 [DEBUG] Discovered plugin: powershell = /usr/local/bin/packer-provisioner-powershell
2015/07/15 23:42:08 [DEBUG] Discovered plugin: puppet-masterless = /usr/local/bin/packer-provisioner-puppet-masterless
2015/07/15 23:42:08 [DEBUG] Discovered plugin: puppet-server = /usr/local/bin/packer-provisioner-puppet-server
2015/07/15 23:42:08 [DEBUG] Discovered plugin: salt-masterless = /usr/local/bin/packer-provisioner-salt-masterless
2015/07/15 23:42:08 [DEBUG] Discovered plugin: shell = /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 [DEBUG] Discovered plugin: shell-local = /usr/local/bin/packer-provisioner-shell-local
2015/07/15 23:42:08 [DEBUG] Discovered plugin: windows-restart = /usr/local/bin/packer-provisioner-windows-restart
2015/07/15 23:42:08 [DEBUG] Discovered plugin: windows-shell = /usr/local/bin/packer-provisioner-windows-shell
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Attempting to open config file: /Users/bob/.packerconfig
2015/07/15 23:42:08 [WARN] Config file doesn't exist: /Users/bob/.packerconfig
2015/07/15 23:42:08 Packer config: &{DisableCheckpoint:false DisableCheckpointSignature:false PluginMinPort:10000 PluginMaxPort:25000 Builders:map[digitalocean:/usr/local/bin/packer-builder-digitalocean googlecompute:/usr/local/bin/packer-builder-googlecompute virtualbox-ovf:/usr/local/bin/packer-builder-virtualbox-ovf amazon-instance:/usr/local/bin/packer-builder-amazon-instance vmware-vmx:/usr/local/bin/packer-builder-vmware-vmx amazon-chroot:/usr/local/bin/packer-builder-amazon-chroot null:/usr/local/bin/packer-builder-null vmware-iso:/usr/local/bin/packer-builder-vmware-iso openstack:/usr/local/bin/packer-builder-openstack parallels-iso:/usr/local/bin/packer-builder-parallels-iso parallels-pvm:/usr/local/bin/packer-builder-parallels-pvm qemu:/usr/local/bin/packer-builder-qemu virtualbox-iso:/usr/local/bin/packer-builder-virtualbox-iso amazon-ebs:/usr/local/bin/packer-builder-amazon-ebs docker:/usr/local/bin/packer-builder-docker file:/usr/local/bin/packer-builder-file] PostProcessors:map[atlas:/usr/local/bin/packer-post-processor-atlas docker-tag:/usr/local/bin/packer-post-processor-docker-tag vagrant-cloud:/usr/local/bin/packer-post-processor-vagrant-cloud vsphere:/usr/local/bin/packer-post-processor-vsphere compress:/usr/local/bin/packer-post-processor-compress docker-import:/usr/local/bin/packer-post-processor-docker-import docker-push:/usr/local/bin/packer-post-processor-docker-push docker-save:/usr/local/bin/packer-post-processor-docker-save vagrant:/usr/local/bin/packer-post-processor-vagrant] Provisioners:map[shell-local:/usr/local/bin/packer-provisioner-shell-local windows-shell:/usr/local/bin/packer-provisioner-windows-shell ansible-local:/usr/local/bin/packer-provisioner-ansible-local chef-client:/usr/local/bin/packer-provisioner-chef-client file:/usr/local/bin/packer-provisioner-file salt-masterless:/usr/local/bin/packer-provisioner-salt-masterless shell:/usr/local/bin/packer-provisioner-shell chef-solo:/usr/local/bin/packer-provisioner-chef-solo powershell:/usr/local/bin/packer-provisioner-powershell puppet-masterless:/usr/local/bin/packer-provisioner-puppet-masterless puppet-server:/usr/local/bin/packer-provisioner-puppet-server windows-restart:/usr/local/bin/packer-provisioner-windows-restart]}
2015/07/15 23:42:08 Setting cache directory: /Users/bob/Projects/garbanzo/packer_cache
2015/07/15 23:42:08 Detected home directory from env var: /Users/bob
2015/07/15 23:42:08 Loading builder: docker
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-builder-docker []string{"/usr/local/bin/packer-builder-docker"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-builder-docker
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin389384987
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 Loading provisioner: shell
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-provisioner-shell []string{"/usr/local/bin/packer-provisioner-shell"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-provisioner-shell
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin592962254
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-provisioner-shell: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 Loading post-processor: docker-tag
2015/07/15 23:42:08 Creating plugin client for path: /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 Starting plugin: /usr/local/bin/packer-post-processor-docker-tag []string{"/usr/local/bin/packer-post-processor-docker-tag"}
2015/07/15 23:42:08 Waiting for RPC address for: /usr/local/bin/packer-post-processor-docker-tag
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin minimum port: 10000
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin maximum port: 25000
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Plugin address: unix /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-plugin099680253
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Waiting for connection...
2015/07/15 23:42:08 packer-post-processor-docker-tag: 2015/07/15 23:42:08 Serving a plugin connection...
2015/07/15 23:42:08 ui: docker output will be in this color.
2015/07/15 23:42:08 ui: 
2015/07/15 23:42:08 Build debug mode: false
2015/07/15 23:42:08 Force build: false
2015/07/15 23:42:08 Preparing build: docker
docker output will be in this color.

2015/07/15 23:42:08 Waiting on builds to complete...
2015/07/15 23:42:08 Starting build run: docker
2015/07/15 23:42:08 Running builder: docker
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 [DEBUG] Docker version: 1.7.1
2015/07/15 23:42:08 ui: ==> docker: Creating a temporary directory for sharing data...
==> docker: Creating a temporary directory for sharing data...
2015/07/15 23:42:08 ui: ==> docker: Pulling Docker image: gliderlabs/herokuish
==> docker: Pulling Docker image: gliderlabs/herokuish
2015/07/15 23:42:08 packer-builder-docker: 2015/07/15 23:42:08 Executing: /usr/local/bin/docker [pull gliderlabs/herokuish]
2015/07/15 23:42:11 ui:     docker: latest: Pulling from gliderlabs/herokuish
    docker: latest: Pulling from gliderlabs/herokuish
2015/07/15 23:42:11 ui:     docker: 835c565d00e2: Already exists
    docker: 835c565d00e2: Already exists
2015/07/15 23:42:11 ui:     docker: c5c659229e15: Already exists
    docker: c5c659229e15: Already exists
2015/07/15 23:42:11 ui:     docker: 9a8403cd4d99: Already exists
    docker: 9a8403cd4d99: Already exists
2015/07/15 23:42:11 ui:     docker: 89fc314a0a6e: Already exists
    docker: 89fc314a0a6e: Already exists
2015/07/15 23:42:11 ui:     docker: d257698c42c5: Already exists
    docker: d257698c42c5: Already exists
2015/07/15 23:42:11 ui:     docker: c6c6baedb602: Already exists
    docker: c6c6baedb602: Already exists
2015/07/15 23:42:11 ui:     docker: c6c6baedb602: Already exists
    docker: c6c6baedb602: Already exists
2015/07/15 23:42:11 ui:     docker: Digest: sha256:4b08475f91eaccceb40fcbb5e0c43a992257b1bdedbf86f2777f458da9a0e2cd
2015/07/15 23:42:11 ui:     docker: Status: Image is up to date for gliderlabs/herokuish:latest
    docker: Digest: sha256:4b08475f91eaccceb40fcbb5e0c43a992257b1bdedbf86f2777f458da9a0e2cd
    docker: Status: Image is up to date for gliderlabs/herokuish:latest
2015/07/15 23:42:11 ui: ==> docker: Starting docker container...
==> docker: Starting docker container...
2015/07/15 23:42:11 ui:     docker: Run command: docker run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Starting container with args: [run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash]
    docker: Run command: docker run -v /Users/bob/Projects/garbanzo:/tmp/app -v /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-docker638187454:/packer-files -d -i -t gliderlabs/herokuish /bin/bash
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Waiting for container to finish starting
2015/07/15 23:42:11 ui:     docker: Container ID: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
    docker: Container ID: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Running the provision hook
2015/07/15 23:42:11 ui: ==> docker: Provisioning with shell script: /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589
2015/07/15 23:42:11 packer-provisioner-shell: 2015/07/15 23:42:11 Opening /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589 for reading
==> docker: Provisioning with shell script: /var/folders/4j/hd7wss1n4xzc8xn224xsyls80000gn/T/packer-shell845253589
2015/07/15 23:42:11 packer-provisioner-shell: 2015/07/15 23:42:11 [INFO] 44 bytes written for 'uploadData'
2015/07/15 23:42:11 [INFO] 44 bytes written for 'uploadData'
2015/07/15 23:42:11 packer-builder-docker: 2015/07/15 23:42:11 Executing in container cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16: "(command cp /packer-files/upload803520517 /tmp/script_7943.sh) >/packer-files/cmd416685472 2>&1; echo $? >/packer-files/cmd416685472-exit"
2015/07/15 23:42:13 packer-builder-docker: 2015/07/15 23:42:13 Waiting for exit code to appear for remote command...
^C
2015/07/15 23:50:00 Closing stdin because interrupt received.
2015/07/15 23:50:00 Stopping build: docker
2015/07/15 23:50:00 packer-post-processor-docker-tag: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-provisioner-shell: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-builder-docker: 2015/07/15 23:50:00 Received interrupt signal (count: 1). Ignoring.
2015/07/15 23:50:00 packer-builder-docker: 2015/07/15 23:50:00 Cancelling the step runner...
2015/07/15 23:50:01 packer-builder-docker: 2015/07/15 23:50:01 Cancelling provisioning due to interrupt...
2015/07/15 23:50:01 Provisioner.Cancel err: unexpected EOF
2015/07/15 23:50:01 /usr/local/bin/packer-provisioner-shell: plugin process exited
2015/07/15 23:50:01 ui: ==> docker: Killing the container: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
==> docker: Killing the container: cc6a7056923234a1264718283c1a58a1c49796d64458cefe84e5ee4941c4bf16
2015/07/15 23:50:01 Build cancelled: docker
2015/07/15 23:50:01 ui: Build 'docker' finished.
2015/07/15 23:50:01 Builds completed. Waiting on interrupt barrier...
2015/07/15 23:50:01 ui: Cleanly cancelled builds after being interrupted.
2015/07/15 23:50:01 waiting for all plugin processes to complete...
Build 'docker' finished.
Cleanly cancelled builds after being interrupted.
2015/07/15 23:50:01 /usr/local/bin/packer-post-processor-docker-tag: plugin process exited
2015/07/15 23:50:01 /usr/local/bin/packer-builder-docker: plugin process exited

poked around on the container before I killed it:

$ ls /packer-files
cmd416685472       cmd416685472-exit
$ cat /packer-files/cmd416685472
cp: cannot stat '/packer-files/upload803520517': No such file or directory
@Decipher

This comment has been minimized.

Show comment
Hide comment
@Decipher

Decipher Aug 25, 2015

Ditto, experiencing this issue on OSX with Packer 0.8.5 and Docker 1.8.1.

Ditto, experiencing this issue on OSX with Packer 0.8.5 and Docker 1.8.1.

@cbednarski

This comment has been minimized.

Show comment
Hide comment
@cbednarski

cbednarski Aug 25, 2015

Contributor

@Decipher I opened a new issue for this here: #2675

Contributor

cbednarski commented Aug 25, 2015

@Decipher I opened a new issue for this here: #2675

@markpeek markpeek self-assigned this Oct 5, 2015

markpeek added a commit to markpeek/packer that referenced this issue Oct 6, 2015

Workaround docker-machine shared folder mapping issue
When using docker-machine on a Mac only the /Users folder is shared with
the VM. Uploads fail since the normal tmpdir is not shared. This change
uses the local packer directory (usually when run in the users home
folders) allowing it to work without setting TMPDIR explicitly. A better
fix would be to use the docker API directly but that would force users
to use docker API version 20+.
This fixes #901, fixes #1752, fixes #2436, fixes #2675, fixes #2697.

markpeek added a commit to markpeek/packer that referenced this issue Oct 7, 2015

Workaround docker-machine shared folder mapping issue
When using docker-machine on a Mac only the /Users folder is shared with
the VM. Uploads fail since the normal tmpdir is not shared. This change
uses the local packer directory (usually when run in the users home
folders) allowing it to work without setting TMPDIR explicitly. A better
fix would be to use the docker API directly but that would force users
to use docker API version 20+.
- fixes #901, fixes #1752, fixes #2436, fixes #2675, fixes #2697.

markpeek added a commit to markpeek/packer that referenced this issue Oct 7, 2015

Workaround docker-machine shared folder mapping issue
When using docker-machine on a Mac only the /Users folder is shared with
the VM. Uploads fail since the normal tmpdir is not shared. This change
uses the local packer directory (usually when run in the users home
folders) allowing it to work without setting TMPDIR explicitly. A better
fix would be to use the docker API directly but that would force users
to use docker API version 20+.
- fixes #901, fixes #1752, fixes #2436, fixes #2675, fixes #2697.

lolindrath added a commit to lolindrath/packer that referenced this issue Oct 14, 2015

Workaround docker-machine shared folder mapping issue
When using docker-machine on a Mac only the /Users folder is shared with
the VM. Uploads fail since the normal tmpdir is not shared. This change
uses the local packer directory (usually when run in the users home
folders) allowing it to work without setting TMPDIR explicitly. A better
fix would be to use the docker API directly but that would force users
to use docker API version 20+.
- fixes #901, fixes #1752, fixes #2436, fixes #2675, fixes #2697.
@dysinger

This comment has been minimized.

Show comment
Hide comment
@dysinger

dysinger Oct 21, 2016

Contributor

This is still a problem on Docker 1.12.1 with packer 0.10.2

Contributor

dysinger commented Oct 21, 2016

This is still a problem on Docker 1.12.1 with packer 0.10.2

@anthonyvallee

This comment has been minimized.

Show comment
Hide comment
@anthonyvallee

anthonyvallee Oct 30, 2016

I confirm having the same issue using Docker 1.12.1 and Packer 0.11.0.

I confirm having the same issue using Docker 1.12.1 and Packer 0.11.0.

@evanstachowiak

This comment has been minimized.

Show comment
Hide comment
@evanstachowiak

evanstachowiak Jan 10, 2017

This for me is only happening when packer is running inside of docker and then trying to provision a new docker. Maybe this is doing it wrong?

This for me is only happening when packer is running inside of docker and then trying to provision a new docker. Maybe this is doing it wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment