Docker hub自动构建失败但本地没有

时间:2015-02-14 15:25:38

标签: docker dockerhub

我已在Docker hub here上设置了自动构建(来源为here)。

构建在本地很顺利。我还尝试使用--no-cache选项重建它:

docker build --no-cache .

该过程成功完成

Successfully built 68b34a5f493a

但是,使用此错误日志在Docker中心上自动构建失败:

...
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

这个版本显然在以下vim命令中失败:

vim +PluginInstall +GoInstallBinaries +qall

请注意,警告Output is not to a terminalInput is not to a terminal也会显示在本地版本中。

我无法理解这是怎么发生的。我使用的是标准的Ubuntu 14.04系统。

1 个答案:

答案 0 :(得分:3)

我终于明白了。该问题与this one有关。

我在我的主机上使用Docker 1.0,但是后来的版本在Docker Hub中正在生产中。如果没有Dockerfile中的显式ENV HOME=...行,则版本1.0使用/作为主目录,而更高版本使用/root。结果是vim无法找到其.vimrc文件,因为它已在/而非/root中复制。我使用的解决方案是在我的Dockerfile中明确定义ENV HOME=/root,因此两个版本之间没有区别。

相关问题