Skip to content

Instantly share code, notes, and snippets.

@xinau
Created January 20, 2019 14:37
Show Gist options
  • Save xinau/c3839a400fc48f34ccb9a71613aaee56 to your computer and use it in GitHub Desktop.
Save xinau/c3839a400fc48f34ccb9a71613aaee56 to your computer and use it in GitHub Desktop.
packer inspec.io docker target
{
"variables": {
"host": "default"
},
"builders": [
{
"type": "docker",
"image": "debian:latest",
"commit": "true",
"run_command": [
"-d",
"-i",
"-t",
"--name",
"{{user `host`}}",
"{{.Image}}",
"/bin/bash"
]
}
],
"provisioners": [
{
"type": "inspec",
"host": "{{user `host`}}",
"backend": "docker",
"profile": "/home/vagrant/test.rb"
}
]
}
describe os.family do
it { should eq 'debian' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment