Hi all!
I am new to packer but I am trying to get it :). I created a template for a
docker image creation. This is the content:
"builders": [{
"type": "docker",
"image": "ubuntu",
"commit": true,
"run_command": []
}],
"provisioners": [
{
"type": "shell",
"inline": ["apt-get update -y && apt-get install -y python2.7 && ln
-s /usr/bin/python2.7 /usr/bin/python"]
},
{
"type": "ansible",
"playbook_file": "../ansible/wordpress.yml"
}
],
I am running packer under WSL (Windows 10) with latest updates. Packer
version: 1.0.4. When I try to build the image this is what I get:
docker output will be in this color.
==> docker: Creating a temporary directory for sharing data...
==> docker: Pulling Docker image: ubuntu
docker: Using default tag: latest
docker: latest: Pulling from library/ubuntu
docker: Digest:
sha256:7a47ccc3bbe8a451b500d2b53104868b46d60ee8f5b35a24b41a86077c650210
docker: Status: Image is up to date for ubuntu:latest
==> docker: Starting docker container...
docker: Run command: docker run -v
/root/.packer.d/tmp/packer-docker001065102:/packer-files -d -i -t ubuntu
/bin/bash
docker: Container ID:
9dbe3834c612ce80bf670efd4383edfc0cfff9e8e84161f54df21fc497248eed
==> docker: Provisioning with shell script: /tmp/packer-shell985519329
==> docker: Killing the container:
9dbe3834c612ce80bf670efd4383edfc0cfff9e8e84161f54df21fc497248eed
Build 'docker' errored: Retryable error: Error uploading script: Upload
failed with non-zero exit status: 1
==> Some builds didn't complete successfully and had errors:
--> docker: Retryable error: Error uploading script: Upload failed with
non-zero exit status: 1
==> Builds finished but no artifacts were created.
Checking the /tmp/ logs for packer I get a lot of lines with:
2019/02/22 02:22:13 packer: 2019/02/22 02:22:13 [INFO] 107 bytes written
for 'uploadData'
2019/02/22 02:22:13 [INFO] 107 bytes written for 'uploadData'
2019/02/22 02:22:13 packer: 2019/02/22 02:22:13 Executing docker exec -i
9dbe3834c612ce80bf670efd4383edfc0cfff9e8e84161f54df21fc497248eed /bin/sh -c
(command cp /packer-files/upload322355498 /tmp/script_4968.sh):
2019/02/22 02:22:13 packer: 2019/02/22 02:22:13 Retryable error: Error
uploading script: Upload failed with non-zero exit status: 1
Docker under WSL is linked form Docker for Windows.
Please let me know your thoughts regarding this issue.
Thank you!
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/18afa6c0-dd65-4e95-8d98-944375b2d0c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.