skip maintainer command

This commit is contained in:
Priya Wadhwa 2018-04-16 14:21:37 -07:00
parent 0c327b9d64
commit 6548835db5
No known key found for this signature in database
GPG Key ID: 0D0DAFD8F7AA73AE
3 changed files with 8 additions and 0 deletions

View File

@ -17,3 +17,4 @@
FROM gcr.io/google-appengine/debian9
RUN echo "hey"
MAINTAINER kaniko

View File

@ -20,6 +20,7 @@ import (
"github.com/containers/image/manifest"
"github.com/docker/docker/builder/dockerfile/instructions"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
type DockerCommand interface {
@ -60,6 +61,9 @@ func GetCommand(cmd instructions.Command, buildcontext string) (DockerCommand, e
return &OnBuildCommand{cmd: c}, nil
case *instructions.VolumeCommand:
return &VolumeCommand{cmd: c}, nil
case *instructions.MaintainerCommand:
logrus.Warnf("%s is deprecated, skipping", cmd.Name())
return nil, nil
}
return nil, errors.Errorf("%s is not a supported command", cmd.Name())
}

View File

@ -85,6 +85,9 @@ func DoBuild(dockerfilePath, srcContext, destination, snapshotMode string) error
if err != nil {
return err
}
if dockerCommand == nil {
continue
}
if err := dockerCommand.ExecuteCommand(imageConfig); err != nil {
return err
}