Skip to content

Commit

Permalink
Document publish command
Browse files Browse the repository at this point in the history
Documents publish command and its intended usage vs the
build and up commands.

Ref: openfaas/faas-cli#841

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Nov 17, 2020
1 parent d510aee commit 2b3b658
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/cli/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@ faas-cli build --help

* Build images with Docker

The `faas-cli build` command builds a Docker image into your local Docker library, which can then be used locally or pushed into a remote Docker registry. Each change of your function requires a new `faas-cli build` command to be issued.
The `faas-cli build` command builds a Docker image into your local Docker library, which can then be used locally or pushed into a remote Docker registry. Each change of your function requires a new `faas-cli build` command to be issued.

* Publish multi-arch images

If you need to target a range of CPU architectures such as 64-bit ARM and Raspberry Pi, then take a look at the new publish command.

This is not designed to replace the `faas-cli build` or `faas-cli up` workflow for local development, but to be used from CI to publish images for multiple architectures.

The publish command makes use of the Docker buildx add-on, which will need to be installed. A suitable multi-arch template will also be required such as [golang-middleware](https://github.com/openfaas/golang-http-template).

* How to do CI/CD

When it comes to continuous integration and delivery you can use the `faas-cli` tool on your build server to build and deploy your code using the built-in commands.
When it comes to continuous integration and delivery you can use the `faas-cli` tool on your build server to build and deploy your code using the built-in commands.

* Generate a Dockerfile with `--shrinkwrap`
* Generate a Dockerfile and Docker build context with `--shrinkwrap`

If you are using an alternative container image builder or are automating the `faas-cli` then you can use the `--shrinkwrap` flag which will produce a folder named `./build/function-name` with a Dockerfile. This bundle can be used with any container builder.
If you are using an alternative container image builder such as [kaniko](https://github.com/GoogleContainerTools/kaniko) or are automating the `faas-cli` then you can use the `--shrinkwrap` flag which will produce a folder named `./build/function-name` with a Dockerfile. This bundle can be used with any container builder.

## 1.0 Apply build options

Expand Down

0 comments on commit 2b3b658

Please sign in to comment.