bash - 在 Docker 中运行可执行的 Bash 脚本
问题描述
我有一个 Docker 容器(在这里你可以找到 dockerfile 定义https://gist.github.com/ypriverol/05002f5c6477034fef0f05fae25e4f8b
Bash 脚本如:
#!/bin/bash
echo "Analysing Data"
exec mono /home/bin/tool.exe "$@"
当我以这种方式执行容器时,
docker run -v /home/data:/data_input -i -t toolcontainer nameofscript -i=/data_input/fileinput -o=/data_input/ -m -c=PXD00001
我得到了错误:
standard_init_linux.go:190: exec 用户进程导致“exec 格式错误”
为什么我收到错误并且我无法执行包含单声道工具的脚本。?
解决方案
推荐阅读
- angular - 尝试在 Angular 中使用 quill 编辑器组件实现 quill-better-table 时出错
- javascript - 使用 Multer 将文件上传到 Google Cloud Storage 时出现奇怪的错误
- go - 我可以给函数的返回类型起别名吗
- python - Python - 将多列还原为单列
- r - 如何使用 R Plotly 按钮功能显示/隐藏数据?
- mysql - 从 Azure SQL 导入 MySQL 工作台数据库
- grails - Grails - 如何将数据绑定到命令对象中的地图?
- ansible - 奇数 Ansible 输出
- android - 如何使用 Cordova 打开华为 AppGallery 商店?
- javascript - 倒数计时器执行外部函数