openfaas / openfaas/faas-cli

[Feature] Add Docker buildx multi-arch support

Open
#770 7 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

design/review enhancement
Dominant language
Go
Stars
816
Forks
230
Avg merge
6h 4m
Merged PRs (30d)
1

Description

In order to support the packaging of a function multi-platform docker images, the FaaS CLI build command needs to provide new options to select the target platforms

Expected Behaviour

Ability to pass a list of target platforms to the docker build.

Current Behaviour

There's no option to pass this parameter.

Possible Solution

Add a new parameter --platform to the build command.
The supported platforms (e. g. linux/amd64,linux/arm/v7) should be included in the faas-cli build --help
Experimental docker features (buildx/buildkit) should be enabled implicitly.

Context

While building multi-platform in a CI, the build needed to be triggered outside the faas-cli using native docker commands.

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

Start at the FaaS CLI build command and its Docker build integration. Check how command options are exposed in faas-cli build --help, then verify that a comma-separated platform list is accepted and that Docker buildx/buildkit is enabled for the build. Done means multi-platform images can be built through the CLI without invoking native Docker commands separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.