Skip to content

Instantly share code, notes, and snippets.

@dan3sh
Last active October 8, 2018 18:23
Show Gist options
  • Save dan3sh/80b0c025153d9800e043f7a7d2a26223 to your computer and use it in GitHub Desktop.
Save dan3sh/80b0c025153d9800e043f7a7d2a26223 to your computer and use it in GitHub Desktop.
ubuntu packer image with docker installed
{
"variables": {
"vm_name": "bloggy-docker"
},
"builders": [
{
"type": "virtualbox-ovf",
"headless": true,
"source_path": "vms/bloggy-base.ovf",
"ssh_username": "bloggard",
"ssh_password": "<ha-ha,right>",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'bloggard'|sudo -S shutdown -P now",
"guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
"virtualbox_version_file": ".vbox_version",
"vm_name": "{{ user `vm_name` }}",
"output_directory": "image/",
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"2048"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"2"
]
]
}
],
"provisioners": [
{
"type": "ansible-local",
"playbook_file": "ansible/main.yml"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment