alibaba / funcraft

(have) Fun with Serverless(API Gateway & Function Compute)
MIT License
941 stars 129 forks source link

在有 Funfile 的情况下支持本地打包 #1130

Open bytemain opened 3 years ago

bytemain commented 3 years ago

目前是发现有 Funfile 就启用 docker。

using template: template.yml

start building function dependencies without docker

building xxx/xxx

Funfile exist, Fun will use container to build forcely

但是我们的 CI 上需要本地打包,开发时因为是 Mac 所以要使用容器进行打包。。

看了一下 build 的参数,并没有本地打包的选项

aliuq commented 3 years ago

有个参数fun build -d

❯ fun build -h
Usage: fun build [options] [[service/]function]

Build the dependencies.

Options:
  -d, --use-docker           Use docker container to build functions
  -b, --use-buildkit         Use buildkit to build functions
  -y, --assume-yes           Automatic yes to prompts. Assume "yes" as answer to all prompts and run non-interactively.
  -t, --template [template]  The path of fun template file.
  -h, --help                 display help for command