hashicorp / hashicorp/packer-plugin-docker

log output of docker communicator commands

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
builder/docker enhancement
Dominant language
Go
Stars
40
Forks
29
PR merge metrics
No merged PRs in 30d

Description

_This issue was originally opened by @gfx as hashicorp/packer#4935. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._


I use packer to build Docker images. `packer build ...` on local Mac succeeds but it fails on Circle CI 2.0, even there're some cases that it fails with `cirlceci` CLI.

Unfortunately, the error logs have no information about it. How can I debug it?

---

packer version: 1.0.0
Host platform: Docker (image base: `amazonlinux:latest`)
logs:

```
2017/05/26 05:35:52 ui: docker: Container ID: 309cb52e190e2d07d6d5a6ed5f793d477ee8555c6473cb64fefa80ead705667c
docker: Container ID: 309cb52e190e2d07d6d5a6ed5f793d477ee8555c6473cb64fefa80ead705667c
2017/05/26 05:35:53 packer: 2017/05/26 05:35:53 Running the provision hook
2017/05/26 05:35:53 ui: ==> docker: Uploading foo.txt => /
==> docker: Uploading foo.txt => /
2017/05/26 05:35:53 packer: 2017/05/26 05:35:53 [INFO] 0 bytes written for 'uploadData'
2017/05/26 05:35:53 [INFO] 0 bytes written for 'uploadData'
2017/05/26 05:35:53 packer: 2017/05/26 05:35:53 Executing docker exec -i 309cb52e190e2d07d6d5a6ed5f793d477ee8555c6473cb64fefa80ead705667c /bin/sh -c (command cp /packer-files/upload756830470 /foo.txt):
2017/05/26 05:35:53 ui error: ==> docker: Upload failed: Upload failed with non-zero exit status: 1
==> docker: Upload failed: Upload failed with non-zero exit status: 1
2017/05/26 05:35:53 ui: ==> docker: Killing the container: 309cb52e190e2d07d6d5a6ed5f793d477ee8555c6473cb64fefa80ead705667c
==> docker: Killing the container: 309cb52e190e2d07d6d5a6ed5f793d477ee8555c6473cb64fefa80ead705667c
2017/05/26 05:35:55 ui error: Build 'docker' errored: Upload failed with non-zero exit status: 1
2017/05/26 05:35:55 Builds completed. Waiting on interrupt barrier...
2017/05/26 05:35:55 machine readable: error-count []string{"1"}
2017/05/26 05:35:55 ui error:
==> Some builds didn't complete successfully and had errors:
```

(see https://circleci.com/gh/gfx/packer-on-docker-on-circleci2/3 for all the logs)

Reproducable example: https://github.com/gfx/packer-on-docker-on-circleci2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.