{"action":"closed","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/1752","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/1752/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/1752/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/1752/events","html_url":"https://github.com/mitchellh/packer/issues/1752","id":51821367,"number":1752,"title":"Shell scripts broken with Docker 1.4.x","user":{"login":"pleschev","id":475479,"avatar_url":"https://avatars.githubusercontent.com/u/475479?v=3","gravatar_id":"","url":"https://api.github.com/users/pleschev","html_url":"https://github.com/pleschev","followers_url":"https://api.github.com/users/pleschev/followers","following_url":"https://api.github.com/users/pleschev/following{/other_user}","gists_url":"https://api.github.com/users/pleschev/gists{/gist_id}","starred_url":"https://api.github.com/users/pleschev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleschev/subscriptions","organizations_url":"https://api.github.com/users/pleschev/orgs","repos_url":"https://api.github.com/users/pleschev/repos","events_url":"https://api.github.com/users/pleschev/events{/privacy}","received_events_url":"https://api.github.com/users/pleschev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/builder/docker","name":"builder/docker","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":62,"created_at":"2014-12-12T16:01:19Z","updated_at":"2015-05-29T17:56:10Z","closed_at":"2015-05-29T17:56:10Z","body":"Using the current source version of packer\r\n\r\nWorking scenario using docker 1.3.3:\r\n```\r\n2014/12/12 15:49:51 packer-builder-docker: 2014/12/12 15:49:51 Running the provision hook\r\n1418399391,,ui,message,    docker: Container ID: b0117b8cbffd154539242acb24666f703b78ff22ef782e0d03cc768ba38db982\r\n2014/12/12 15:49:51 packer-provisioner-shell: 2014/12/12 15:49:51 Opening /tmp/packer-shell648686173 for reading\r\n2014/12/12 15:49:51 packer-provisioner-shell: 2014/12/12 15:49:51 [INFO] 109 bytes written for 'uploadData'\r\n2014/12/12 15:49:51 [INFO] 109 bytes written for 'uploadData'\r\n2014/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\"\r\n1418399391,,ui,say,==> docker: Provisioning with shell script: /tmp/packer-shell648686173\r\n2014/12/12 15:49:53 packer-builder-docker: 2014/12/12 15:49:53 Waiting for exit code to appear for remote command...\r\n2014/12/12 15:49:53 packer-builder-docker: 2014/12/12 15:49:53 Executed command exit status: 0\r\n2014/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\"\r\n2014/12/12 15:49:57 packer-builder-docker: 2014/12/12 15:49:57 Waiting for exit code to appear for remote command...\r\n2014/12/12 15:49:57 packer-builder-docker: 2014/12/12 15:49:57 Executed command exit status: 0\r\n2014/12/12 15:49:59 packer-builder-docker: 2014/12/12 15:49:59 [INFO] RPC endpoint: Communicator ended with: 0\r\n2014/12/12 15:49:59 [INFO] RPC client: Communicator ended with: 0\r\n2014/12/12 15:49:59 [INFO] RPC endpoint: Communicator ended with: 0\r\n2014/12/12 15:49:59 packer-provisioner-shell: 2014/12/12 15:49:59 [INFO] RPC client: Communicator ended with: 0\r\n2014/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\"\r\n2014/12/12 15:50:01 packer-builder-docker: 2014/12/12 15:50:01 Waiting for exit code to appear for remote command...\r\n2014/12/12 15:50:02 packer-builder-docker: 2014/12/12 15:50:02 Executed command exit status: 127\r\n2014/12/12 15:50:03 packer-builder-docker: 2014/12/12 15:50:03 [INFO] RPC endpoint: Communicator ended with: 127\r\n2014/12/12 15:50:03 [INFO] 0 bytes written for 'stderr'\r\n2014/12/12 15:50:03 [INFO] RPC client: Communicator ended with: 127\r\n2014/12/12 15:50:03 [INFO] 0 bytes written for 'stdout'\r\n2014/12/12 15:50:03 [INFO] RPC endpoint: Communicator ended with: 127\r\n2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] 0 bytes written for 'stderr'\r\n2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] RPC client: Communicator ended with: 127\r\n2014/12/12 15:50:03 packer-provisioner-shell: 2014/12/12 15:50:03 [INFO] 0 bytes written for 'stdout'\r\n```\r\n\r\nFailing scenario using docker 1.4:\r\n```\r\n1418398765,,ui,say,==> docker: Provisioning with shell script: /tmp/packer-shell348099556\r\n2014/12/12 15:39:25 packer-provisioner-shell: 2014/12/12 15:39:25 Opening /tmp/packer-shell348099556 for reading\r\n2014/12/12 15:39:25 packer-provisioner-shell: 2014/12/12 15:39:25 [INFO] 109 bytes written for 'uploadData'\r\n2014/12/12 15:39:25 [INFO] 109 bytes written for 'uploadData'\r\n2014/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\"\r\n2014/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\r\n2014/12/12 15:39:29 packer-provisioner-shell: 2014/12/12 15:39:29 [INFO] 109 bytes written for 'uploadData'\r\n2014/12/12 15:39:29 [INFO] 109 bytes written for 'uploadData'\r\n2014/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\"\r\n2014/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\r\n2014/12/12 15:39:33 packer-provisioner-shell: 2014/12/12 15:39:33 [INFO] 109 bytes written for 'uploadData'\r\n2014/12/12 15:39:33 [INFO] 109 bytes written for 'uploadData'\r\n2014/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\"\r\n2014/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\r\n2014/12/12 15:39:37 packer-provisioner-shell: 2014/12/12 15:39:37 [INFO] 109 bytes written for 'uploadData'\r\n2014/12/12 15:39:37 [INFO] 109 bytes written for 'uploadData'\r\n2014/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\"\r\n2014/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\r\n2014/12/12 15:39:41 packer-provisioner-shell: 2014/12/12 15:39:41 [INFO] 109 bytes written for 'uploadData'\r\n```\r\n"}}