Skip to content

Skaffold tried to pull image for wrong plaform #9161

@matanw

Description

@matanw

Expected behavior

"skaffold build" should work on my skaffold yaml

Actual behavior

Skaffold failed to pull remote image:

Generating tags...

  • my-image -> my-image:latest
    Some taggers failed. Rerun with -vdebug for errors.
    Checking cache...
  • my-image: Error checking cache.
    getting hash for artifact "my-image": getting dependencies for "my-image": parsing ONBUILD instructions: retrieving image "mcr.microsoft.com/dotnet/framework/wcf:latest": no child with platform linux/amd64 in index mcr.microsoft.com/dotnet/framework/wcf:latest

When I execute "docker pull mcr.microsoft.com/dotnet/framework/wcf:latest" it worked

Information

apiVersion: skaffold/v4beta4
kind: Config
build:
    artifacts:
        - image: my-image
          context: .
          docker:
            dockerfile: ./Dockerfile
          platforms:
            - windows

Dockerfile:
FROM mcr.microsoft.com/dotnet/framework/wcf:latest

Steps to reproduce the behavior

run "skaffold build"

Root cause:
When code retrive image from remote -

cfg, err = RetrieveRemoteConfig(image, l.cfg, v1.Platform{})
It doesn't use any platform that it get from caller, but v1.Platform{}, so client try to pull images for default plafrom, mean linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions