docker - 在 Docker 中从源安装
问题描述
我需要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
正如它写在这里。
当我尝试构建我的 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
解决方案
你需要先运行autogen.sh,它会生成配置文件
PS 确保你安装了 libtool
apt-get install libtool
推荐阅读
- java - Lucene 索引损坏
- python - 为什么 SQLAlchemy 批量更新映射操作会很慢?
- spring-boot - Spring boot中的多个Multipart文件上传
- python - 在 for 循环中将字符串转换为 int
- sas - 为什么 SAS 不支持短路运算符?
- .htaccess - .htaccess 中是否有记录 301 重定向的日志?
- java - 为什么下面代码中的这个特定类成员没有初始化?
- python - 使用 python 上传数据时未在 SQL Server 上创建表
- javascript - 组件中的 Vuejs 挂载钩子未按预期工作
- django - Django:如何区分同一模型的多对多关系