Commit 1de226c7 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

post-processor/docker-import: verify proper builder ID

parent 86350856
......@@ -64,6 +64,13 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
}
func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) {
if artifact.BuilderId() != docker.BuilderId {
err := fmt.Errorf(
"Unknown artifact type: %s\nCan only import from Docker builder artifacts.",
artifact.BuilderId())
return nil, false, err
}
importRepo := p.config.Repository
if p.config.Tag != "" {
importRepo += ":" + p.config.Tag
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment