ploomber / soopervisor

☁️ Export Ploomber pipelines to Kubernetes (Argo), Airflow, AWS Batch, SLURM, and Kubeflow.
https://soopervisor.readthedocs.io
Apache License 2.0
45 stars 18 forks source link

support for buildx when building Docker image #83

Open wardzxzxc opened 2 years ago

wardzxzxc commented 2 years ago

With the increased usage of the M1 chips in Macbooks, users might want to build Docker images for different architectures. This is especially so since the default images build by M1 Macbooks are in arm64 but most Cloud services are using a Linux based OS for their VMs.

Although currently the export command allows users to pass in build arguments, it's still not possible to use buildx and select a different architecture when building images. Instead, users will need to understand what's happening to the export command and mimic it manually so they can use buildx to build the Docker image.

edublancas commented 2 years ago

hi, thanks for your feedback. we'll work on this.

this is an easy fix. We already support passing custom args to docker build , although this feature is undocumented.

the remaining change would be to also support customizing which commands is executed (possibly via another env variable):

https://github.com/ploomber/soopervisor/blob/c1238e5458e3103e5a852f2c78561095e5cdc997/src/soopervisor/commons/docker.py#L104