diff --git a/buildpack/dockerfile.go b/buildpack/dockerfile.go index 4f191d72a..d6fb5c574 100644 --- a/buildpack/dockerfile.go +++ b/buildpack/dockerfile.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/moby/buildkit/frontend/dockerfile/instructions" + "github.com/moby/buildkit/frontend/dockerfile/linter" "github.com/moby/buildkit/frontend/dockerfile/parser" "github.com/buildpacks/lifecycle/log" @@ -74,7 +75,7 @@ func parseDockerfile(dockerfile string) ([]instructions.Stage, []instructions.Ar if err != nil { return nil, nil, err } - stages, metaArgs, err := instructions.Parse(p.AST) + stages, metaArgs, err := instructions.Parse(p.AST, &linter.Linter{}) if err != nil { return nil, nil, err } diff --git a/testhelpers/docker.go b/testhelpers/docker.go index 0779d5294..0daed3495 100644 --- a/testhelpers/docker.go +++ b/testhelpers/docker.go @@ -12,7 +12,7 @@ import ( "sync" "testing" - dockertypes "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/image" dockercli "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" "github.com/pkg/errors" @@ -109,7 +109,7 @@ func DockerVolumeExists(t *testing.T, volumeName string) bool { // FIXME: re-work this function to exec the docker cli, or convert other docker helpers to using the client library. func PushImage(dockerCli dockercli.CommonAPIClient, ref string, auth string) error { - rc, err := dockerCli.ImagePush(context.Background(), ref, dockertypes.ImagePushOptions{RegistryAuth: auth}) + rc, err := dockerCli.ImagePush(context.Background(), ref, image.PushOptions{RegistryAuth: auth}) if err != nil { return errors.Wrap(err, "pushing image") } diff --git a/tools/image/main.go b/tools/image/main.go index 4785caa04..f80c1d4b2 100644 --- a/tools/image/main.go +++ b/tools/image/main.go @@ -13,6 +13,7 @@ import ( "path/filepath" "runtime" + "github.com/docker/docker/api/types/image" "github.com/pkg/errors" "github.com/BurntSushi/toml" @@ -20,7 +21,6 @@ import ( "github.com/buildpacks/imgutil/layer" "github.com/buildpacks/imgutil/local" "github.com/buildpacks/imgutil/remote" - dockertypes "github.com/docker/docker/api/types" dockercli "github.com/docker/docker/client" "github.com/google/go-containerregistry/pkg/authn" @@ -325,10 +325,10 @@ func lifecycleLayer() (string, error) { } func pullImage(dockerCli dockercli.CommonAPIClient, ref string) error { - rc, err := dockerCli.ImagePull(context.Background(), ref, dockertypes.ImagePullOptions{}) + rc, err := dockerCli.ImagePull(context.Background(), ref, image.PullOptions{}) if err != nil { // Retry - rc, err = dockerCli.ImagePull(context.Background(), ref, dockertypes.ImagePullOptions{}) + rc, err = dockerCli.ImagePull(context.Background(), ref, image.PullOptions{}) if err != nil { return err }