Concourse Python自定义资源类型Check步骤执行失败求助
Concourse自定义资源Check步骤失败排查与解决
报错信息
run check step: check: Backend error: Exit status: 500, message: { "Type":"", "Message":"runc exec: exit status 1: exec failed: container_linux.go:380: starting container process caused: no such file or directory", "Handle":"", "ProcessID":"", "Binary":"" }
当前Check脚本内容
#!/usr/local/bin/python import json if __name__ == "__main__": print(json.dumps([{"version": "1.0.0" }]))
解决要点
- 验证自定义资源的容器镜像中是否安装了Python,且路径与脚本开头的
#!/usr/local/bin/python完全匹配。若容器内Python实际路径为/usr/bin/python或/usr/bin/python3,需修改shebang行对应路径。 - 确保
check脚本拥有可执行权限,在构建镜像的Dockerfile中添加RUN chmod +x check指令。 - 检查Dockerfile中是否正确将
check脚本拷贝到镜像的指定目录(通常是/opt/resource/check),且工作目录配置无误。
内容的提问来源于stack exchange,提问作者Manoj kumar
相关产品推荐
相关产品推荐

