"dockerfile"文本文件忙 [英] "dockerfile" text file busy

查看:633
本文介绍了"dockerfile"文本文件忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从dockerfile创建一个项目.首先,我应该从github克隆一个框架并安装它. 在我的Dockerfile中,我具有以下指令:

I want to create a project from dockerfile. Firstly, I should clone a framework from github and install it. In my Dockerfile I have the following instrutions:

RUN git clone https://github.com/simgrid/project.git
WORKDIR "/project"
RUN cmake option1 options2 .
RUN sudo make
RUN sudo make install 

我使用以下图像构建图像:

I build image with:

docker build -t "myimage" . 

但是我有关于text file busy的错误.我该如何克服?

But I have an error about text file busy. How can I overcome it?

    make[2]: execvp: /simgrid/tools/sg_unit_extractor.pl: Text file busy
    make[2]: *** [src/cunit_unit.cpp] Error 127
    CMakeFiles/testall.dir/build.make:69: recipe for target 'src/cunit_unit.cpp' failed
    CMakeFiles/Makefile2:616: recipe for target 'CMakeFiles/testall.dir/all' failed
    make[1]: *** [CMakeFiles/testall.dir/all] Error 2
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2
    The command '/bin/sh -c sudo make' returned a non-zero code: 2

我的Dockerfile内容是:

My Dockerfile content is:

FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
            sudo \
            git \
            build-essential \ 
            cmake \
            libboost-dev \
            libboost-all-dev \
            doxygen \
            python3
RUN git clone https://github.com/simgrid/simgrid.git
WORKDIR "/simgrid"
RUN cmake -Denable_documentation=OFF -Denable_coverage=OFF -Denable_java=OFF -Denable_model-checking=OFF \
    -Denable_lua=OFF -Denable_compile_optimizations=OFF -Denable_smpi=OFF -Denable_smpi_MPICH3_testsuite=OFF -Denable_compile_warnings=OFF .
RUN sudo make 
RUN sudo make install

推荐答案

您看到的错误消息来自make的输出.对于Docker来说,这似乎不是一个错误.相反,这指向图像中正在编译的代码,因此您想在github中向他们提出这个问题.

The error message you are seeing is from the output of make. It does not appear be an error for Docker. Instead, this points back to the code being compiled inside the image and so you would want to raise this issue with them in github.

我确实看到使用该应用程序编译的内核和网络组件数量很多,这些组件可能无法在docker沙箱中正常运行,因此您尝试编译的代码可能无法以这种隔离方式运行而不禁用docker提供的某些保护.请参阅 docker的安全文档了解更多详细信息,尤其是有关名称空间,cgroup和功能的信息.保护内核.

I do see a fair number of kernel and network components being compiled with the app, which may not properly function in a docker sandbox, and so the code you are trying to compile may not be able to run in this type of isolation without disabling some of the protections that docker provides. See docker's security documentation for more details, particularly on the namespaces, cgroups, and capabilities to protect the kernel.

这篇关于"dockerfile"文本文件忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆