Created
July 11, 2015 16:22
-
-
Save svnlto/0f158b26844b910fd7cb to your computer and use it in GitHub Desktop.
packer file that creates a docker container based on alpine linux from an ansible playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders":[{ | |
"type": "docker", | |
"image": "yikaus/alpine-bash", | |
"export_path": "image.tar" | |
}], | |
"provisioners":[ | |
{ | |
"type": "shell", | |
"inline": [ | |
"apk update", | |
"apk add --update py-pip ansible", | |
"pip install --upgrade ansible" | |
] | |
}, | |
{ | |
"type": "ansible-local", | |
"playbook_file": "./playbooks/local.yml" | |
}, | |
{ | |
"type": "shell", | |
"inline": [ | |
"apk del ansible", | |
"rm -rf /var/cache/apk/**/" | |
] | |
} | |
], | |
"post-processors": [ | |
{ | |
"type": "docker-import", | |
"repository": "svnlto/packer-ansible", | |
"tag": "latest" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment