building containers on M1 for intel architecture

103 views Asked by At

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!

1

There are 1 answers

0
Cmag On

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

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

docs