D. Make
D. Make

Reputation: 600

Install from source in Docker

I need to install graph-tool from source, so I add in my Dockerfile this:

FROM ubuntu:18.04

RUN git clone https://git.skewed.de/count0/graph-tool.git
RUN cd graph-tool && ./configure && make && make install

as it written here.

When I try to build my Docker-compose I catch a error:

/bin/sh: 1: ./configure: not found

What am I doing wrong? Thanks!

ADDED Full 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

Upvotes: 1

Views: 2826

Answers (2)

Mohamed Ali
Mohamed Ali

Reputation: 176

You need to run autogen.sh first, it will generate configure file

P.S. Make sure you install libtool

apt-get install libtool

Upvotes: 3

Harald Pollak
Harald Pollak

Reputation: 151

You have to install the prerequisites first.

RUN apt update && apt install -y --no-install-recommends \
    make \
    build-essential \
    g++ \
    ....

Don't forget to clean up and remove temp/unnecessary files!

Upvotes: 2

Related Questions