sudo docker run:未绑定的变量错误

时间:2014-12-27 16:54:41

标签: docker

我在我的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

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

该图像由用户提供,而不是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

相关问题