hashicorp / packer-plugin-docker

Packer plugin for Docker Builder
https://www.packer.io/docs/builders/docker
Mozilla Public License 2.0
30 stars 26 forks source link

Update to latest version of packer-plugin-sdk #24

Closed nywilken closed 3 years ago

nywilken commented 3 years ago

This change fixes an issue where the file provisioner was failing to upload files to the container being built.

Closes #22

Build before change

==> Wait completed after 4 seconds 314 milliseconds 2021/03/30 10:24:25
machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors: 2021/03/30
10:24:25 machine readable: docker.base_setup,error
[]string{"[pos 1963]: readContainerLen: Unrecognized descriptor byte: hex:
d7, decimal: 215"}
==> Builds finished but no artifacts were created. 2021/03/30 10:24:25
[INFO] (telemetry) Finalizing. Build 'docker.base_setup' errored after 4
seconds 314 milliseconds: [pos 1963]: readContainerLen: Unrecognized
descriptor byte: hex: d7, decimal: 215

Build after change

==> docker.base_setup: Uploading docker_centos_source_block.pkr.hcl =>
/tmp/bar
   docker.base_setup: docker_centos_source_block.pkr.hcl 440 B / 440 B
[=========] 100.00% 0s
==> docker.base_setup: Committing the container
   docker.base_setup: Image ID:
sha256:f56da4e379f49f993dfd3c97f972011fba3338728d227065a2ee1a3a043b5d16
==> docker.base_setup: Killing the container:
1a104a33cce6f08c9b88e5dd19517b18fc603c9ec9a084eeef4031ae413958ec
==> docker.base_setup: Running post-processor:  (type checksum) Build
'docker.base_setup' finished after 4 seconds 780 milliseconds.

==> Wait completed after 4 seconds 780 milliseconds

==> Builds finished. The artifacts of successful builds are:
--> docker.base_setup: Imported Docker image:
sha256:f56da4e379f49f993dfd3c97f972011fba3338728d227065a2ee1a3a043b5d16
--> docker.base_setup: Created artifact from files:
sylviamoss commented 3 years ago

You are removing the docs-artifacts folder in both prs https://github.com/hashicorp/packer-plugin-docker/pull/23

nywilken commented 3 years ago

Accidentally forced pushed while rebasing this change.