0

docker 自定义 docker/buildx.sh

docker buildx create --name awear-builder --platform $platforms --driver-opt=network=host

docker buildx build --builder awear-builder --tag $IMAGE --platform linux/arm64 --push -f ./docker/Dockerfile .

斯卡佛德尔

apiVersion: skaffold/v2beta19
kind: Config
metadata:
  name: micro-one
build:
  artifacts:
    - image: localhost:5000/micro-one
      context: .
      custom:
        buildCommand: sh docker/buildx.sh
        dependencies:
          paths:
            - docker/buildx.sh
            - src/*
  tagPolicy:
    sha256: {}
  local:
    push: false
deploy:
  kustomize: 
    paths: ["k8s/overlays/dev/"]
#  kubectl:
#    manifests:
#      - deployment.yaml
portForward:
  - resourceType: service
    resourceName: micro-one
    namespace: default
    port: 80
    localPort: 8080
profiles:
  - name: test
    build:
      local: {}

错误

the custom script didn't produce an image with tag [localhost:5000/micro-one:latest]
4

1 回答 1

0

following did the trick

docker buildx prune
于 2021-12-20T21:48:09.817 回答