Skip to content

When --platform is in options, pass it to docker pull #648

@pmatos

Description

@pmatos

Describe the enhancement

Lets say I create a multi-platform image, for linux/amd64 and linux/386.
I cannot run this on a hosted runner due to actions/runner-images#1368 however, I thought I could setup a self-hosted runner to run this by enabling the docker service to run with experimental mode.

I have:

  buildtest-linux_i386:
    runs-on: [self-hosted, Linux, X64]

    container:
      image: racket/racket-ci:latest
      options: --init --platform 'linux/386'

   ...

This does not work because the first step the runner does it docker pull <image>. This will pull the wrong image because it doesn't take into consideration the --platform 'linux/386' option. So on a amd64 system, it will pull the image for amd64 and then the --platform option to docker create is a no-op because we already pulled the wrong image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions