PlanktoScope / forklift

Composable, reprovisionable, decentralized management of apps & configs on Raspberry Pis and other embedded Linux systems
Apache License 2.0
7 stars 0 forks source link

platforms: Enable overriding platform selection for multiplatform container images #256

Open ethanjli opened 3 months ago

ethanjli commented 3 months ago

Currently, Forklift uses the GOARCH it was compiled for to select container image architectures for downloading multiplatform images as the appropriate CPU architecture; right now this is only used for downloading container images to export files from, but once we complete #245 it'll also be used for caching container images to load into Docker. This means that if we run an arm64-compiled Forklift on an arm64 CPU running an armhf Debian system, Forklift will attempt to download linux/arm64 container images instead of linux/arm/v7 container images; and Docker will be unable to run those container images. It would be better if we could override the default container image platform selection behavior with a config file, e.g. in a file in ~/.config/forklift, and/or an optional CLI argument whose default value is set based on the Forklift binary's GOARCH.