-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
57 lines (45 loc) · 1.46 KB
/
Dockerfile
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
#------------------------------#
# BUILD STAGE
#------------------------------#
FROM ubuntu:19.04 AS base
ARG njobs=2
ARG build_type=Release
ARG IKOS_VERSION=v2.2
WORKDIR /root/ikos
# Upgrade
RUN apt-get update -y \
&& echo "deb http://apt.llvm.org/disco/ llvm-toolchain-disco-8 main" >> /etc/apt/sources.list \
&& apt-get install -y wget gnupg \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& apt-get update -y \
&& apt-get install -y gcc g++ cmake libgmp-dev libboost-dev \
libboost-filesystem-dev libboost-test-dev python python-pygments \
libsqlite3-dev libz-dev libedit-dev llvm-8 llvm-8-dev llvm-8-tools clang-8 \
git \
&& git clone --single-branch https://github.com/NASA-SW-VnV/ikos.git . \
&& git checkout tags/${IKOS_VERSION} \
&& 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" \
-DLLVM_CONFIG_EXECUTABLE="/usr/lib/llvm-8/bin/llvm-config" \
.. \
&& make \
&& make install \
&& make check
#------------------------------#
# FINAL STAGE
#------------------------------#
FROM ubuntu:19.04
COPY --from=base /opt/ikos /opt/ikos
RUN apt-get update -y && apt-get install -y \
python \
clang-8 \
libboost-filesystem-dev \
libgmp-dev \
&& rm -rf /var/lib/apt/lists/*
ENV PATH "/opt/ikos/bin:$PATH"
WORKDIR /src
LABEL maintainer="begarco"