Check if image exists before skipping compilation

This commit is contained in:
Ettore Di Giacinto
2020-06-03 21:00:30 +02:00
parent 990a5405cf
commit 9e0e1199df
4 changed files with 31 additions and 9 deletions

View File

@@ -97,6 +97,13 @@ func (*SimpleImg) CopyImage(src, dst string) error {
return nil
}
func (*SimpleImg) ImageExists(imagename string) bool {
// NOOP: not implemented
// TODO: Since img doesn't have an inspect command,
// we need to parse the ls output manually
return false
}
func (s *SimpleImg) ImageDefinitionToTar(opts compiler.CompilerBackendOptions) error {
if err := s.BuildImage(opts); err != nil {
return errors.Wrap(err, "Failed building image")