Skip to content

ENH: Support pass-through options to container engine (Docker or Podman) #695

@jeliker1

Description

@jeliker1

Please add option to pass container engine directives/arguments. For example:

fn build --container-arg platform=linux/amd64

This specific issue arose when trying to cross-compile on macOS with Apple CPU but output platform is amd64. Docker allows environment variable DOCKER_DEFAULT_PLATFORM=linux/amd64 but Podman doesn't have an equivalent. Instead of relying on container engine options to override default command-line directives, allow me to pass through any number of container engine directives e.g.

  • --platform
  • --arch
  • --all-platforms

…and so on using my example such as (forgive the poor example of setting both platform and arch)

fn build --container-arg platform=linux/amd64 --container-arg arch=amd64 --container-arg all-platforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions