docker / docker/buildx

proposal: use create --platform to set default platforms

Open
#326 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Currently buildx create --platform can be used to set manual platforms for the builder instance. This is used to find a node for a specific platform if multiple nodes support it. Eg. your laptop supports arm via emulation but aws node supports it natively so you set aws node's platform manually to ensure arm workloads go there.

The proposal is to add an additional meaning to this field. If buildx build is used without a build specific --platform flag it could (instead of sending the request without a platform to the first node) build for all the platforms that were manually set on create. This allows to create a builder instance that creates multi-platform images by default.

@tiborvass @cpuguy83 @AkihiroSuda wdyt?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the buildx create --platform handling and the buildx build path when no build-specific --platform is supplied. Determine how manually configured node platforms should affect the default build target, while preserving their existing node-selection meaning. Done means a builder can create multi-platform images by default without an explicit build --platform flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.