Skip to content

Instantly share code, notes, and snippets.

@justincampbell
Created October 5, 2015 17:52
Show Gist options
  • Save justincampbell/9dd8d9065b9f9f82b3a8 to your computer and use it in GitHub Desktop.
Save justincampbell/9dd8d9065b9f9f82b3a8 to your computer and use it in GitHub Desktop.
x27[1;32mdocker output will be in this color.x27[0m
x27[1;32m==> docker: Creating a temporary directory for sharing data...x27[0m
x27[1;32m==> docker: Pulling Docker image: ubuntux27[0m
x27[0;32m docker: Using default tag: latestx27[0m
x27[0;32m docker: latest: Pulling from library/ubuntux27[0m
x27[0;32m docker: d3a1f33e8a5a: Already existsx27[0m
x27[0;32m docker: c22013c84729: Already existsx27[0m
x27[0;32m docker: d74508fb6632: Already existsx27[0m
x27[0;32m docker: 91e54dfb1179: Already existsx27[0m
x27[0;32m docker: Digest: sha256:73fbe2308f5f5cb6e343425831b8ab44f10bbd77070ecdfbe4081daa4dbe3ed1x27[0m
x27[0;32m docker: Status: Image is up to date for ubuntu:latestx27[0m
x27[1;32m==> docker: Starting docker container...x27[0m
x27[0;32m docker: Run command: docker run -v /tmp/packer-docker608492992:/packer-files -d -i -t ubuntu /bin/bashx27[0m
x27[0;32m docker: Container ID: 771e58e046b8c49a729536288867b70115cef43cef2436bf3c9dbe0a02e09531x27[0m
x27[1;32m==> docker: Provisioning with shell script: /tmp/packer-shell612462822x27[0m
x27[0;32m docker: 1+0 records inx27[0m
x27[0;32m docker: 1+0 records outx27[0m
x27[0;32m docker: 1048576 bytes (1.0 MB) copied, 0.0606442 s, 17.3 MB/sx27[0m
x27[0;32m docker: 100+0 records inx27[0m
x27[0;32m docker: 100+0 records outx27[0m
x27[0;32m docker: 104857600 bytes (105 MB) copied, 6.29646 s, 16.7 MB/sx27[0m
x27[0;32m docker: e385a076fe33a224cc5c7ec6a4f53fd7 /tmp/smallx27[0m
x27[0;32m docker: 25792ca17b421631468ed684a8e4b9c9 /tmp/bigx27[0m
x27[1;32m==> docker: Downloading /tmp/small => smallx27[0m
x27[1;32m==> docker: Downloading /tmp/big => bigx27[0m
x27[1;32m==> docker: Executing local command: md5sum small bigx27[0m
x27[0;32m docker: e385a076fe33a224cc5c7ec6a4f53fd7 smallx27[0m
x27[0;32m docker: ea050f649daf0ae895af438a6f8f06b1 bigx27[0m
x27[1;32m==> docker: Committing the containerx27[0m
x27[0;32m docker: Image ID: 44e4e83b1552ba880d840d3941335358a99da514f6398d50edc3cbce8cc09defx27[0m
x27[1;32m==> docker: Killing the container: 771e58e046b8c49a729536288867b70115cef43cef2436bf3c9dbe0a02e09531x27[0m
x27[1;32mBuild 'docker' finished.x27[0m
==> Builds finished. The artifacts of successful builds are:
--> docker: Imported Docker image: 44e4e83b1552ba880d840d3941335358a99da514f6398d50edc3cbce8cc09def
{
"builders": [
{
"type": "docker",
"image": "ubuntu",
"commit": true
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"dd if=/dev/urandom of=/tmp/small bs=1M count=1",
"dd if=/dev/urandom of=/tmp/big bs=1M count=100",
"sync",
"md5sum /tmp/small /tmp/big"
]
},
{
"type": "file",
"source": "/tmp/small",
"destination": "small",
"direction": "download"
},
{
"type": "file",
"source": "/tmp/big",
"destination": "big",
"direction": "download"
},
{
"type": "shell-local",
"command": "md5sum small big"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment