27 lines
532 B
Go
27 lines
532 B
Go
|
package vagrant
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/hashicorp/packer/packer"
|
||
|
)
|
||
|
|
||
|
type DockerProvider struct{}
|
||
|
|
||
|
func (p *DockerProvider) KeepInputArtifact() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (p *DockerProvider) Process(ui packer.Ui, artifact packer.Artifact, dir string) (vagrantfile string, metadata map[string]interface{}, err error) {
|
||
|
// Create the metadata
|
||
|
metadata = map[string]interface{}{"provider": "docker"}
|
||
|
|
||
|
vagrantfile = fmt.Sprintf(dockerVagrantfile)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
var dockerVagrantfile = `
|
||
|
Vagrant.configure("2") do |config|
|
||
|
end
|
||
|
`
|