Docker中心自动构build失败,但本地不成立
我已经在这里设置了Docker中心的自动构build(源代码在这里 )。
生成在当地很好。 我也尝试用--no-cache
选项重build它:
docker build --no-cache .
该过程成功完成
Successfully built 68b34a5f493a
但是,Docker集线器上的自动构build失败,并显示以下错误日志:
... Cloning into 'nerdtree'... [91mVim: Warning: Output is not to a terminal [0m [91mVim: Warning: Input is not from a terminal [0m [m[m[0m[H[2J[24;1HError detected while processing command line: E492: Not an editor command: PluginInstall E492: Not an editor command: GoInstallBinaries [91mmv: cannot stat `/go/bin/*': No such file or directory [0m
这个构build在下面的vim命令上显然失败了:
vim +PluginInstall +GoInstallBinaries +qall
请注意,警告Output is not to a terminal
, Input is not to a terminal
也出现在本地生成。
我不明白这是怎么发生的。 我正在使用标准的Ubuntu 14.04系统。
我终于弄明白了。 这个问题与这个有关。
我在主机中使用Docker 1.0,但Docker Hub中正在生产更高版本。 如果Dockerfile中没有显式的ENV HOME=...
行,版本1.0使用/
作为主目录,而/root
被更高版本使用。 结果是vim
无法find它的.vimrc
文件,因为它被复制到/
而不是/root
。 我使用的解决scheme是显式定义我的Dockerfile中的ENV HOME=/root
,所以两个版本没有区别。