File: Dockerfile

package info (click to toggle)
ikos 3.5-2
  • links: PTS, VCS
  • area: non-free
  • in suites: sid
  • size: 11,896 kB
  • sloc: cpp: 102,890; python: 6,471; ansic: 5,860; sh: 2,409; javascript: 348; makefile: 16
file content (64 lines) | stat: -rw-r--r-- 1,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM archlinux/base
MAINTAINER Maxime Arthaud <maxime.arthaud@nasa.gov>
ARG njobs=2
ARG build_type=Release

# Installs the following versions (note that it might be out of date):
# cmake 3.16.0
# gmp 6.1.2
# mpfr 4.0.2
# ppl 1.2
# apron 0.9.10
# boost 1.71.0
# python 3.8
# sqlite 3.30.1
# tbb 11009
# llvm 9.0.0
# clang 9.0.0
# gcc 9.2.0

# Upgrade
RUN pacman --noconfirm -Sy archlinux-keyring
RUN pacman --noconfirm -Syu
RUN pacman-db-upgrade

# Install most dependencies
RUN pacman -S --noconfirm base-devel git cmake gmp boost boost-libs python python-pygments sqlite intel-tbb llvm llvm-libs clang

# Use -j$njobs when building packages
RUN echo "MAKEFLAGS=\"-j$njobs\"" >> /etc/makepkg.conf

# Create user 'makepkg' with sudo access
RUN useradd -m makepkg
RUN echo "makepkg ALL=(root) NOPASSWD: /usr/bin/pacman" >> /etc/sudoers

# Install apron using AUR
USER makepkg
WORKDIR /home/makepkg
RUN git clone https://aur.archlinux.org/apron.git
WORKDIR /home/makepkg/apron
RUN makepkg -si --noconfirm

# Add ikos source code
USER root
ADD . /root/ikos

# Build ikos
RUN rm -rf /root/ikos/build && mkdir /root/ikos/build
WORKDIR /root/ikos/build
ENV MAKEFLAGS "-j$njobs"
RUN cmake \
        -DCMAKE_INSTALL_PREFIX="/opt/ikos" \
        -DCMAKE_BUILD_TYPE="$build_type" \
        ..
RUN make
RUN make install

# Run the tests
RUN make check

# Add ikos to the path
ENV PATH "/opt/ikos/bin:$PATH"

# Done
WORKDIR /