2014-12-27 48 views
0

我在我的Linux筆記本電腦上安裝了docker.io,並在Docker網站上公開提供的容器上做了docker pullsudo docker run:未綁定變量錯誤

我想用下面的命令交互運行,但我得到一個錯誤:

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

該圖像由用戶提供,而不是由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