sudo docker run: unbound variable error



我在 Linux 笔记本电脑上安装了 docker.io,并在 docker 网站上公开提供的容器上进行了docker pull

我正在尝试使用以下命令以交互方式运行它,但出现错误:

sudo docker pull nucleotides/sga
sudo docker run -i nucleotides/sga /bin/bash
+ set -o nounset
/usr/local/bin/run: line 9: $2: unbound variable

有什么想法吗?

该映像由用户提供,而不是 Docker 自己。

它使用入口点脚本,该脚本将/bin/bash命令解释为第一个参数。你可以在这里看看脚本:https://github.com/nucleotides/docker-sga/blob/master/run。它具有有关参数的以下信息:

# The first argument is the location of the reads in the container filesystem.
# The will be present in a read-only directory
READS=$2
# The second argument is a directory with write-access where the final
# assembly should be written to.
DIR=$3

可以公平地说,这个脚本没有遵循最佳实践,以这种方式吞噬输入是非常令人困惑的。有关最佳实践的更多信息,请参阅文档:https://docs.docker.com/articles/dockerfile_best-practices/#entrypoint。

最新更新