Files
ortools-clone/cmake/docker/ubuntu/python.Dockerfile
2020-03-31 12:35:35 +02:00

33 lines
786 B
Docker

FROM ortools:ubuntu_swig AS env
RUN apt-get update -qq \
&& apt-get install -yq python3-dev python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM env AS devel
WORKDIR /home/lib
COPY . .
FROM devel AS build
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_PYTHON=ON
RUN cmake --build build --target all
RUN cmake --build build --target install
FROM build AS test
RUN cmake --build build --target test
FROM env AS install_env
COPY --from=build /usr/local /usr/local/
FROM install_env AS install_devel
WORKDIR /home/sample
COPY ci/sample .
FROM install_devel AS install_build
RUN cmake -S. -Bbuild
RUN cmake --build build --target all -v
RUN cmake --build build --target install
FROM install_build AS install_test
RUN cmake --build build --target test