skip maintainer command
This commit is contained in:
parent
0c327b9d64
commit
6548835db5
|
|
@ -17,3 +17,4 @@
|
||||||
|
|
||||||
FROM gcr.io/google-appengine/debian9
|
FROM gcr.io/google-appengine/debian9
|
||||||
RUN echo "hey"
|
RUN echo "hey"
|
||||||
|
MAINTAINER kaniko
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import (
|
||||||
"github.com/containers/image/manifest"
|
"github.com/containers/image/manifest"
|
||||||
"github.com/docker/docker/builder/dockerfile/instructions"
|
"github.com/docker/docker/builder/dockerfile/instructions"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DockerCommand interface {
|
type DockerCommand interface {
|
||||||
|
|
@ -60,6 +61,9 @@ func GetCommand(cmd instructions.Command, buildcontext string) (DockerCommand, e
|
||||||
return &OnBuildCommand{cmd: c}, nil
|
return &OnBuildCommand{cmd: c}, nil
|
||||||
case *instructions.VolumeCommand:
|
case *instructions.VolumeCommand:
|
||||||
return &VolumeCommand{cmd: c}, nil
|
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())
|
return nil, errors.Errorf("%s is not a supported command", cmd.Name())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,9 @@ func DoBuild(dockerfilePath, srcContext, destination, snapshotMode string) error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if dockerCommand == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if err := dockerCommand.ExecuteCommand(imageConfig); err != nil {
|
if err := dockerCommand.ExecuteCommand(imageConfig); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue