COIN-OR::LEMON - Graph Library

Ticket #631: docker.patch

File docker.patch, 3.3 KB (added by David Torres Sanchez, 3 years ago)

Add docker files with some linux distros

  • new file docker/alpine.Dockerfile

    diff -r a278d16bd2d0 docker/alpine.Dockerfile
    - +  
     1FROM alpine:edge
     2
     3RUN apk add --no-cache git build-base cmake mercurial
     4
     5# Create lib directory
     6WORKDIR /home/lib
     7COPY . .
     8
     9RUN cmake -S . -Bbuild
     10RUN cmake --build build --target all
     11RUN cd build && ctest --verbose
     12RUN cmake --build build --target install -v -- DESTDIR=install
  • new file docker/archlinux.Dockerfile

    diff -r a278d16bd2d0 docker/archlinux.Dockerfile
    - +  
     1FROM archlinux:latest
     2
     3RUN pacman -Syu --noconfirm git base-devel cmake
     4
     5# Create lib directory
     6WORKDIR /home/lib
     7COPY . .
     8
     9RUN cmake -S . -Bbuild
     10RUN cmake --build build --target all
     11RUN cd build && ctest --verbose
     12RUN cmake --build build --target install -v -- DESTDIR=install
  • new file docker/debian.Dockerfile

    diff -r a278d16bd2d0 docker/debian.Dockerfile
    - +  
     1FROM debian:latest AS base
     2
     3RUN apt-get update -qq \
     4&& apt-get install -yq \
     5 git wget build-essential cmake mercurial \
     6 # Comment to try with gcc/g++-10
     7gcc-9 g++-9 \
     8&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10 \
     9&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10 \
     10&& apt-get clean \
     11&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
     12
     13# Create lib directory
     14WORKDIR /home/lib
     15COPY . .
     16RUN cmake -S . -Bbuild
     17RUN cmake --build build --target all
     18RUN cd build && ctest --verbose
     19RUN cmake --build build --target install -v -- DESTDIR=install
  • new file docker/docker-compose.yml

    diff -r a278d16bd2d0 docker/docker-compose.yml
    - +  
     1version: "2.3"
     2
     3services:
     4
     5  lemon-alpine:
     6    image: lemon-alpine:latest
     7    build:
     8      context: ../
     9      dockerfile: docker/alpine.Dockerfile
     10      cache_from:
     11        - lemon-alpine:latest
     12
     13  lemon-ubuntu:
     14    image: lemon-ubuntu:latest
     15    build:
     16      context: ../
     17      dockerfile: docker/ubuntu.Dockerfile
     18      cache_from:
     19        - lemon-ubuntu:latest
     20
     21  lemon-debian:
     22    image: lemon-debian:latest
     23    build:
     24      context: ../
     25      dockerfile: docker/debian.Dockerfile
     26      cache_from:
     27        - lemon-debian:latest
     28
     29  lemon-archlinux:
     30    image: lemon-archlinux:latest
     31    build:
     32      context: ../
     33      dockerfile: docker/archlinux.Dockerfile
     34      cache_from:
     35        - lemon-archlinux:latest
  • new file docker/ubuntu.Dockerfile

    diff -r a278d16bd2d0 docker/ubuntu.Dockerfile
    - +  
     1FROM ubuntu:20.04
     2
     3RUN apt-get update -qq \
     4&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
     5 git wget build-essential cmake mercurial \
     6 # Comment to try with gcc/g++-9
     7#  gcc-10 g++-10 \
     8# && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \
     9# && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \
     10&& apt-get clean \
     11&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
     12
     13# Create lib directory
     14WORKDIR /home/lib
     15COPY . .
     16RUN cmake -S . -Bbuild
     17RUN cmake --build build --target all
     18RUN cd build && ctest --verbose
     19RUN cmake --build build --target install -v -- DESTDIR=install