Created
February 12, 2016 00:32
-
-
Save technion/3ad06cf97ae6f864b2c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image | |
FROM debian:stable | |
MAINTAINER Infer | |
# Debian config | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
build-essential \ | |
curl \ | |
git \ | |
groff \ | |
libgmp-dev \ | |
libmpc-dev \ | |
libmpfr-dev \ | |
m4 \ | |
ocaml \ | |
default-jdk \ | |
python-software-properties \ | |
rsync \ | |
software-properties-common \ | |
unzip \ | |
zlib1g-dev | |
# Install OPAM | |
RUN curl -sL \ | |
https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-Li | |
nux \ | |
-o /usr/local/bin/opam && \ | |
chmod 755 /usr/local/bin/opam | |
RUN opam init -y --comp=4.02.3 && \ | |
opam install -y extlib.1.5.4 atdgen.1.6.0 javalib.2.3.1 sawja.1.5.1 | |
# Download the latest Infer release | |
RUN INFER_VERSION=$(curl -s https://api.github.com/repos/facebook/infer/releases \ | |
| grep -e '^[ ]\+"tag_name"' \ | |
| head -1 \ | |
| cut -d '"' -f 4); \ | |
cd /opt && \ | |
curl -sL \ | |
https://github.com/facebook/infer/releases/download/${INFER_VERSION}/infer-linux64-${INFER_VERSION}.tar.xz | \ | |
tar xJ && \ | |
rm -f /infer && \ | |
ln -s ${PWD}/infer-linux64-$INFER_VERSION /infer | |
# Compile Infer | |
RUN cd /infer && \ | |
eval $(opam config env) && \ | |
./configure && \ | |
make -C infer clang | |
# Install Infer | |
ENV INFER_HOME /infer/infer | |
ENV PATH ${INFER_HOME}/bin:${PATH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment