我需要从源代码安装graph-tool
,所以我在Dockerfile中添加以下内容:
FROM ubuntu:18.04
RUN git clone https://git.skewed.de/count0/graph-tool.git
RUN cd graph-tool && ./configure && make && make install
写为here。
当我尝试构建Docker-compose时,我遇到了一个错误:
/bin/sh: 1: ./configure: not found
我在做什么错?谢谢!
添加了完整的Dockerfile:
FROM ubuntu:16.04
ENV LANG C.UTF-8
ENV PYTHONUNBUFFERED 1
ENV C_FORCE_ROOT true
# Install dependencies
RUN apt-get update \
&& apt-get install -y git \
&& apt-get install -y python3-pip python3-dev \
&& apt-get install -y binutils libproj-dev gdal-bin \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
RUN git clone https://git.skewed.de/count0/graph-tool.git
RUN apt-get update && apt-get install -y gcc
RUN apt-get update && apt-get install -y libboost-all-dev
RUN apt update && apt install -y --no-install-recommends \
make \
build-essential \
g++
RUN cd graph-tool && ./configure && make && make install
# Project specific setups
RUN mkdir /code
WORKDIR /code
ADD . /code
RUN pip3 install -r requirements.txt
答案 0 :(得分:3)
您需要先运行 autogen.sh ,它将生成 configure 文件
P.S。确保安装libtool
apt-get install libtool
答案 1 :(得分:2)
您必须先安装必备软件。
RUN apt update && apt install -y --no-install-recommends \
make \
build-essential \
g++ \
....
别忘了清理并删除临时/不必要的文件!