我通過以下方式使用 docker 容器:
# download/pull the image from docker hub
$ docker pull nextgenusfs/funannotate
# download bash wrapper script (optional)
$ wget -O funannotate-docker https://raw.githubusercontent.com/nextgenusfs/funannotate/master/funannotate-docker
# might need to make this executable on your system
$ chmod x /path/to/funannotate-docker
# assuming it is in your PATH, now you can run this script as if it were the funannotate executable script
$ funannotate-docker test -t predict --cpus 12
不幸的是,使用我自己的資料,其中一個工具崩潰了。如何執行容器并在其中登錄以手動運行工具以希望獲得有關其崩潰原因的更多資訊?
先感謝您,
uj5u.com熱心網友回復:
如果容器繼續運行,您可以使用docker exec -ti <containername> bash(或sh)通過互動式終端在容器內執行 shell。
也許您還可以添加一個 shell 或命令 docker run [OPTIONS] IMAGE[:TAG] [COMMAND] [ARG...]
這對我有用
# docker run -ti nextgenusfs/funannotate bash
root@7b3db18d1ca9:/# ls
bin etc lib mnt root srv usr
boot funannotate-setup.log lib64 opt run sys var
dev home media proc sbin tmp venv
root@7b3db18d1ca9:/#
uj5u.com熱心網友回復:
來自funannotate-docker腳本:
docker run --rm "${IT[@]}" --user "${USER}" -e TZ="${TZ}" --workdir "${WORKDIR}" --mount "${MOUNT}" nextgenusfs/funannotate:latest funannotate "$@"
您可以編輯此腳本并echo在它運行之前添加此行(也許您會在命令的引數中看到錯誤)。
然后你可以手動運行它bash而不是funannotate "$@"在最后(假設容器粉碎得太快并且你不能exec在它運行時)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/344457.html
標籤:码头工人
下一篇:“##[error]來自守護行程的錯誤回應:無法到達Dockerfile中的構建目標<stage>”僅在CI管道期間
