【问题标题】:Tekton error , how to fix: Error executing command: fork/exec /tekton/scripts/script-2-m6dkbTekton 错误,如何修复:执行命令时出错:fork/exec /tekton/scripts/script-2-m6dkb
【发布时间】:2021-08-24 06:15:09
【问题描述】:

我在 tekton 步骤之一中遇到此错误。我该如何解决?

  • macos、docker-kubernetes
Error executing command: fork/exec /tekton/scripts/script-2-m6dkb: no such file or directory
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: build-images
spec:
  params:
    - name: person
      description: Name of person to greet
      default: John
      type: string
  steps:
    - name: build
      image: gcr.io/kaniko-project/executor:debug-v0.19.0
      command:
        - /busybox/sh
        - -c
        - echo test
    - name: say-hello
      image: gcr.io/kaniko-project/executor:debug-v0.19.0
      command:
        - /busybox/sh
      args: ['-c', 'echo Hello $(params.person)']
    - name: write-hello #Tekton thsi step fails! Error executing command: fork/exec /tekton/scripts/script-2-m6dkb: no such file or directory
      image: registry.access.redhat.com/ubi8/ubi
      script: |
              #!/user/bin/env bash
              echo Preparing greeting
              echo Hello $(params.person) > ~/hello.txt
              sleep 2
              echo Done!
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: build-images
spec:
  taskRef:
    name: build-images

【问题讨论】:

    标签: docker kubernetes tekton


    【解决方案1】:

    在任务的第三个容器(write-hello)中,替换 #!/user/bin/env bash

    应该是:#!/usr/bin/env bash

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-05
      • 1970-01-01
      • 1970-01-01
      • 2023-03-13
      • 1970-01-01
      • 2022-10-02
      • 2012-05-28
      • 2017-01-19
      相关资源
      最近更新 更多