如何修复使用docker compose构建Git回购时的配置错误

如何修复使用docker compose构建Git回购时的配置错误,docker,docker-compose,dockerfile,openmodelica,Docker,Docker Compose,Dockerfile,Openmodelica,我正在尝试使用docker compose从Git构建OpenModelica。我已经下载了他们列出的所有依赖项。现在,我将它们的构建指令用作RUN语句,并在启动/.configure时出错。要执行的命令的完整序列是 > autoconf > ./configure CC=clang CXX=clang++ > make -j8 > build/bin/omc --version > (cd testsuite/partest && ./runtes

我正在尝试使用docker compose从Git构建OpenModelica。我已经下载了他们列出的所有依赖项。现在,我将它们的构建指令用作
RUN
语句,并在启动
/.configure
时出错。要执行的命令的完整序列是

> autoconf
> ./configure CC=clang CXX=clang++
> make -j8
> build/bin/omc --version
> (cd testsuite/partest && ./runtests.pl)
我已尝试从
/configure
步骤中删除
clang
选项,但这并没有解决错误

我的Docker文件和支持文件是:

Dockerfile

FROM python:3.7
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY pips.txt /code/
COPY gets.txt /code/
RUN pip install -r pips.txt \
    && apt-get update \
    && xargs -a gets.txt apt-get -y install \
    && apt update \
    && apt install -y openscenegraph-3.4

COPY OpenModelica /code/OpenModelica
RUN cd /code/OpenModelica \
    && autoconf \
    && autoreconf -i
RUN cd /code/OpenModelica \
    && ./configure CC=clang-3.8 CXX=clang++-3.8
RUN make -j8 \
    && build/bin/omc --version \
    && (cd testsuite/partest && ./runtests.pl)

COPY . /code/
pips.txt

Django==2.2
psycopg2==2.8.2
gets.txt

...
clang-3.8
clang++-3.8
...
当我启动
docker compose build

ln: failed to create symbolic link '.git/hooks/pre-commit': File exists
我不认为这是一个致命的错误,然后代码继续执行几行,然后

configure: error: no
上下文中的完整错误消息为

Step 10/12 : RUN cd /code/OpenModelica  && ./configure CC=clang-3.8 CXX=clang++-3.8
 ---> Running in 9da205a757d3
checking for gcc... clang-3.8
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang-3.8 accepts -g... yes
checking for clang-3.8 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++-3.8 accepts -g... yes
checking how to run the C preprocessor... clang-3.8 -E
configure: OpenModelica pre-commit hook has been installed
ln: failed to create symbolic link '.git/hooks/pre-commit': File exists
configure: OpenModelica commit-msg hook has been installed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
build_short: x86_64-linux-gnu
host_short: x86_64-linux-gnu
checking if cppruntime is requested... no
checking for omlibrary target... core
checking for libraries directory... configure: error: no
我一直找不到任何关于这个错误的有用信息,因为它太模糊了。我是Docker新手,所以我不确定这是Docker的东西还是OpenModelica特有的东西。

错误

正在检查库目录。。。配置:错误:否

表示子模块中的文件夹库丢失

您是如何克隆OpenModelica存储库的?您需要使用所有子模块递归地克隆它

#通过使用openmodelica.org只读镜像加快拉取速度(欧洲的延迟较低;在更新所有子模块时非常重要)
#将openmodelica.org拉取URL替换为https://github.com/OpenModelica/OpenModelica.git 如果您想直接从github中提取
#默认选择是在github.com(SSH)上推送到您的fork。将MY_FORK替换为OpenModelica以直接推送到OpenModelica存储库(如果您有访问权限)
>MY_FORK=MyGithBubUserName;git克隆https://openmodelica.org/git-readonly/OpenModelica.git --递归&&(cd OpenModelica&&git)远程设置url--推送源git@github.com:$MY_FORK/OpenModelica.git&&git子模块foreach--recursive'git remote set url--push origin`git config--get remote.origin.url | sed s,^.*/,,git@github.com:“$MY_FORK'/,`”)
要查看用于在各种系统上构建和分发OpenModelica的docker文件,您可以查看