Dockerfile:QIODevice :: seek:无法在顺序设备上调用查找

时间:2019-07-13 14:38:08

标签: linux docker build dockerfile

我尝试在docker容器中构建应用程序。

如果我在主机上构建此映像,则一切顺利。如果我将其推送到git,hub.docker在构建日志中显示以下错误:

Step 12/22 : RUN qmake /opt/xflr5
---> Running in 026abab3988e
Info: creating stash file /opt/build/.qmake.stash
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
QIODevice::seek: Cannot call seek on a sequential device
Removing intermediate container 026abab3988e
---> e032d94fd731
Step 13/22 : RUN make
---> Running in 69db13aebe2b
g++ -Wl,-O1 -Wl,-rpath,/usr/local/lib -o xflr5 -L/usr/local/lib -lQt5Gui -lQt5Core -lGL -lpthread
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [xflr5] Error 1
Makefile:235: recipe for target 'xflr5' failed

对应的Dockerfile可以找到here

为什么这种情况发生在hub.docker而不是我的主机上。而我该如何解决呢?

1 个答案:

答案 0 :(得分:0)

https://github.com/docker/for-linux/issues/208

如果使用GitLab,则需要编辑/etc/gitlab-runner/config.toml文件

[[runners]]  
  ...  
  [runners.docker]  
    ...  
    privileged = true  
    ...  
  [runners.cache]