0

我的kubernetes是基于arm的,用kubernetes1.22.4

我的 faas-cli 命令:

faas-cli build -f ./add.yml

响应代码:

[0] > Building add.
Clearing temporary build folder: ./build/add/
Preparing: ./add/ build/add/function
Building: myw/add:latest with python template. Please wait..
Sending build context to Docker daemon  8.192kB
Step 1/31 : FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/classic-watchdog:0.2.0 as watchdog
 ---> 6f97aa96da81
Step 2/31 : FROM --platform=${TARGETPLATFORM:-linux/amd64} python:2.7-alpine
 ---> 8579e446340f
Step 3/31 : ARG TARGETPLATFORM
 ---> Using cache
 ---> a75f5a062540
Step 4/31 : ARG BUILDPLATFORM
 ---> Using cache
 ---> c90a8309e851
Step 5/31 : ARG ADDITIONAL_PACKAGE
 ---> Using cache
 ---> 4ee3e6fab2a3
Step 6/31 : COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
 ---> Using cache
 ---> 33d972637c65
Step 7/31 : RUN chmod +x /usr/bin/fwatchdog
 ---> Running in 6204e8546454
standard_init_linux.go:219: exec user process caused: exec format error
The command '/bin/sh -c chmod +x /usr/bin/fwatchdog' returned a non-zero code: 1
[0] < Building add done in 0.54s.
[0] Worker done.

Total build time: 0.54s
Errors received during build:
- [add] received non-zero exit code from build, error: The command '/bin/sh -c chmod +x /usr/bin/fwatchdog' returned a non-zero code: 1

那么有人可以告诉我在openfaas中使用arm构建功能的正确方法,为什么会发生这种情况,我做错了什么吗?

4

0 回答 0