简体   繁体   中英

building containers on M1 for intel architecture

Folks, Am unable to build a container on my M1 machine for intel k8s, container logs all state:

exec ./fwatchdog: exec format error
  • faas-cli information:
CLI:
 commit:  0074051aeb837f5f160ee8736341460468b5c190
 version: 0.15.4

Gateway
 uri:     http://127.0.0.1:8080
 version: 0.25.3
 sha:     c07bebbbc9c2de4ad3750184cccc23f4ecad16f1


Provider
 name:          faas-netes
 orchestration: kubernetes
 version:       0.16.1
 sha:           cc37f5512a300ab24a26eb3d34896eb89d564737
  • Below are my.yaml files and some commands which tried to no avail.
version: 1.0
provider:
  name: openfaas
  gateway: http://127.0.0.1:8080
functions:
  oi:
    lang: go
    handler: ./oi
    image: us.gcr.io/asdf/oi:latest
    build_args:
      GO111MODULE: on
      GOOS: linux
      GOARCH: amd64
      PLATFORM: amd64

Am I messing up the .yaml definition somehow? I have tried the following as well:

faas-cli build -f oi.yml --no-cache --build-arg platform=linux/amd64

Thank you!

The problem was misusing the faas-cli command, use:

faas-cli publish -f oi.yml --platforms linux/amd64

docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM