首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tekton错误,如何修复:错误执行命令: fork/exec /tekton/script/script-2-m6dkb

Tekton错误,如何修复:错误执行命令: fork/exec /tekton/script/script-2-m6dkb
EN

Stack Overflow用户
提问于 2021-08-19 02:37:51
回答 1查看 1.2K关注 0票数 2

我得到了一个泰克顿步骤的错误。我该怎么补救?

docker-kubernetes

  • macos

代码语言:javascript
复制
Error executing command: fork/exec /tekton/scripts/script-2-m6dkb: no such file or directory
代码语言:javascript
复制
---
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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-23 22:15:09

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

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68841363

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档