Closed jcarapet closed 9 years ago
Hi there,
This is either a duplicate of https://github.com/mitchellh/packer/issues/1752 or potentially https://github.com/mitchellh/packer/issues/1804. Do you see any additional output when you run packer? Could you supply the debug output please?
i've been seeing this as well with packer 0.7.5 and docker 1.3.2-2.fc21.
here's the debug output:
2015/03/05 18:08:02 ui: workspaces_console: [2015-03-06T02:08:02+00:00] INFO: Chef Run complete in 2947.116752103 seconds
2015/03/05 18:08:02 ui: workspaces_console: [2015-03-06T02:08:02+00:00] INFO: Skipping removal of unused files from the cache
2015/03/05 18:08:02 ui: workspaces_console: [2015-03-06T02:08:02+00:00] INFO: Running report handlers
2015/03/05 18:08:02 ui: workspaces_console: [2015-03-06T02:08:02+00:00] INFO: Report handlers complete
2015/03/05 18:08:03 packer-builder-docker: 2015/03/05 18:08:03 Executed command exit status: 0
2015/03/05 18:08:04 packer-builder-docker: 2015/03/05 18:08:04 [INFO] RPC endpoint: Communicator ended with: 0
2015/03/05 18:08:04 [INFO] 0 bytes written for 'stderr'
2015/03/05 18:08:04 [INFO] 43435 bytes written for 'stdout'
2015/03/05 18:08:04 [INFO] RPC client: Communicator ended with: 0
2015/03/05 18:08:04 [INFO] RPC endpoint: Communicator ended with: 0
2015/03/05 18:08:04 packer-provisioner-chef-solo: 2015/03/05 18:08:04 [INFO] RPC client: Communicator ended with: 0
2015/03/05 18:08:04 packer-provisioner-chef-solo: 2015/03/05 18:08:04 [INFO] 0 bytes written for 'stderr'
2015/03/05 18:08:04 packer-provisioner-chef-solo: 2015/03/05 18:08:04 [INFO] 43435 bytes written for 'stdout'
2015/03/05 18:08:04 ui: ==> workspaces_console: Uploading tests => /tmp
2015/03/05 18:08:04 packer-builder-docker: 2015/03/05 18:08:04 Executing in container 89e30ca5b06a3e8c6cf80fbdc052a2223691956165e57e9e84fdd03676a4e10a: "(set -e; mkdir -p /tmp/tests; cp -R /packer-files/dirupload105353668/* /tmp/tests) >/packer-files/cmd313436243 2>&1; echo $? >/packer-files/cmd313436243-exit"
2015/03/05 18:08:06 packer-builder-docker: 2015/03/05 18:08:06 Waiting for exit code to appear for remote command...
2015/03/05 18:08:07 packer-builder-docker: 2015/03/05 18:08:07 Executed command exit status: 0
2015/03/05 18:08:08 ui: ==> workspaces_console: Provisioning with shell script: scripts/validate.sh
2015/03/05 18:08:08 packer-provisioner-shell: 2015/03/05 18:08:08 Opening scripts/validate.sh for reading
2015/03/05 18:08:08 packer-provisioner-shell: 2015/03/05 18:08:08 [INFO] 119 bytes written for 'uploadData'
2015/03/05 18:08:08 [INFO] 119 bytes written for 'uploadData'
2015/03/05 18:08:08 packer-builder-docker: 2015/03/05 18:08:08 Executing in container 89e30ca5b06a3e8c6cf80fbdc052a2223691956165e57e9e84fdd03676a4e10a: "(cp /packer-files/upload748437398 /tmp/script.sh) >/packer-files/cmd523900925 2>&1; echo $? >/packer-files/cmd523900925-exit"
2015/03/05 18:08:10 packer-builder-docker: 2015/03/05 18:08:10 Waiting for exit code to appear for remote command...
2015/03/05 18:08:10 packer-builder-docker: 2015/03/05 18:08:10 Command stdout: "cp: overwrite '/tmp/script.sh'? "
after a bit of digging, looks like i was caught by #1712
so, for any other poor souls bit by EL's "helpful" aliases, it's basically impossible to get packer to override the aliases once they're sourced until the patched version that uses "command" to escape the aliases comes out (or you build your own packer binary with the patch included), but you can stop them from being sourced at all by updating the docker builder's run_command to invoke bash with the --noprofile
and --norc
options.
nathwill, thanks for following up with this. I will have to look at this issue. I
@sethvargo, At this point based on duplicate ticket, and my work putting this on hold for a bit, you are welcome to close the ticket.
This looks like a repeat of a couple issues, but I am getting a slightly different output from the following. https://github.com/mitchellh/packer/issues/1752 https://github.com/mitchellh/packer/issues/1782
Components:
Template.json file looks as such
Problem lies in that whenever I try to provision it with a shell script it gets stuck at the provisioning step
I have tried this with Docker 1.4.1 and Packer 0.5.1 as well. I can run the same command through terminal and it will build container.