Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Oct 28, 2024
1 parent b139d16 commit aff0969
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion buildpack/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions testhelpers/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
Expand Down
6 changes: 3 additions & 3 deletions tools/image/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (
"path/filepath"
"runtime"

"github.com/docker/docker/api/types/image"
"github.com/pkg/errors"

"github.com/BurntSushi/toml"
"github.com/buildpacks/imgutil"
"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"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit aff0969

Please sign in to comment.