4

I have setup an automated build on Docker hub here (the sources are here).

The build goes well locally. I have also tried to rebuild it with --no-cache option:

docker build --no-cache .

And the process completes successfully

Successfully built 68b34a5f493a

However, the automated build fails on Docker hub with this error log:

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

This build apparently fails on the following vim command:

vim +PluginInstall +GoInstallBinaries +qall

Note that the warnings Output is not to a terminal and Input is not to a terminal appears also in the local build.

I cannot understand how this can happen. I am using a standard Ubuntu 14.04 system.

4

1 回答 1

3

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

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

于 2015-03-15T09:58:59.740 回答