0

我在大厅工作时遇到以下错误:

劫持:后端错误:退出状态:500,消息:{“Type”:“”,“Message”:“runc exec:退出状态1:exec失败:container_linux.go:264:启动容器进程导致\“exec:\ \"./task-scripts/task_show_uname.sh\\": stat ./task-scripts/task_show_uname.sh: 没有这样的文件或目录\"\n","Handle":""}

我有一个task.yml:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: task-scripts

run:
  path: ./task-scripts/task_show_uname.sh

***************

task_show_uname.sh runs a simple "uname -a" command.

***************

pipeline.yml 看起来像:

resources:
- name: resource-tutorial
  type: git
  source:
    uri: https://github.com/manmohan1391/concourse-tutorial.git
    branch: master

jobs:
- name: job-hello-world
  public: true
  plan:
  - task: hello-world
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      run:
        path: echo
        args:
        - hello world

- name: scripts
  public: true
  plan:
  - get: resource-tutorial
  - task: script-hello
    file: resource-tutorial/tutorials/basic/task-scripts/task_show_uname.yml

任何想法?

4

2 回答 2

1

如果您的管道变为橙色而不是红色,则表示劫持未能创建并且您无法劫持它。在问题中查看您的任务 yml:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: task-scripts

run:
  path: ./task-scripts/task_show_uname.sh

根据您的管道定义,它应该看起来像这样:

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
- name: resource-tutorial

run:
  path: resource-tutorial/tutorials/basic/task-scripts/task_show_uname.sh
于 2018-06-15T20:44:13.230 回答
0

How are you trying to run hijack? It looks like you're trying to have fly run your script instead of a shell. The hijack command tries to run bash by default and if the docker image doesn't have bash, just have hijack run 'sh'.

于 2018-06-08T17:22:14.763 回答