Allow default platform to be specified with NERDCTL_DEFAULT_PLATFORM / DOCKER_DEFAULT_PLATFORM
What is the problem you're trying to solve
I want to run x86 containers on macOS aarm64. Im faced with setting platform: linux/amd64 in all my compose files and passing --platform x86_64 on all my command line invocations. It'd be nice to set this in an env var in my profile or in a config file (probably the option for either is nice).
Describe the solution you'd like
docker supports this with the DOCKER_DEFAULT_PLATFORM env var....could support that directly or simply have a dedicated nerdctl version: NERDCTL_DEFAULT_PLATFORM.
Additional context
No response
I guess we should extend https://github.com/containerd/nerdctl/blob/master/docs/config.md to support specifying the default nerdctl run template and the nerdctl build template
I guess we should extend https://github.com/containerd/nerdctl/blob/master/docs/config.md to support specifying the default
nerdctl runtemplate and thenerdctl buildtemplate
I think this is making sense
How about this?
[default-run-config]
network="xxx"
[default-build-config]
platform="xxx"
I think to exposure network and platform filed maybe is enough for now.
Hi @AkihiroSuda @Zheaoli , I‘d like to have a try, can you assign this to me?
Hi @AkihiroSuda @Zheaoli , I‘d like to have a try, can you assign this to me?
Of course