Skip to content

Instantly share code, notes, and snippets.

@hatappi
Last active June 16, 2017 06:11
Show Gist options
  • Save hatappi/5203b479b24a1f676798f66331ec89cd to your computer and use it in GitHub Desktop.
Save hatappi/5203b479b24a1f676798f66331ec89cd to your computer and use it in GitHub Desktop.
{
"variables": {
"docker_hub_login_email": "{{env `DOCKER_HUB_LOGIN_EMAIL`}}",
"docker_hub_login_password": "{{env `DOCKER_HUB_LOGIN_PASSWORD`}}"
},
"builders":[
{
"type": "docker",
"image": "ubuntu",
"export_path": "image.tar"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo 'SAMPLE!!!!' > /tmp/sample"
]
}
],
"post-processors": [
[
{
"type": "docker-import",
"repository": "hatappi/packer-sample",
"tag": "latest"
},
{
"type": "docker-push",
"login": true,
"login_username": "hatappi",
"login_email": "{{user `docker_hub_login_email`}}",
"login_password": "{{user `docker_hub_login_password`}}"
}
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment