cli
cli copied to clipboard
ENH: Support pass-through options to container engine (Docker or Podman)
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