add newly missing dependencies

Summary:public
- install the "pkg-config" and "ncurses-dev" apt packages
- install the android-22 target as the base image stopped shipping with it
- use more robust ways of installing opam depencies
- switch build command to `./build-infer.sh`
- switch android example to use gradlew instead of gradle because it complains
  about gradle-2.11 not being gradle-2.2

closes #291

Reviewed By: cristianoc

Differential Revision: D3000540

fb-gh-sync-id: f8bd44b
shipit-source-id: f8bd44b
master
Jules Villard 9 years ago committed by Facebook Github Bot 0
parent b62bdc46b6
commit 8e8b710556

@ -3,39 +3,40 @@ FROM heikomaass/android-sdk
MAINTAINER Infer
# Add build-tools-22 to the Android SDK
RUN ["/opt/sdk-tools/android-accept-licenses.sh", "android update sdk --filter \"build-tools-22.0.1\" --no-ui --force -a"]
# Add android-22 and build-tools-22 to the Android SDK
RUN ["/opt/sdk-tools/android-accept-licenses.sh", \
"android update sdk --filter \"android-22\" --no-ui --force --all"]
RUN ["/opt/sdk-tools/android-accept-licenses.sh", \
"android update sdk --filter \"build-tools-22.0.1\" --no-ui --force --all"]
# Debian config
RUN add-apt-repository ppa:cwchien/gradle # to get a recent gradle
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
gradle \
groff \
libgmp-dev \
libmpc-dev \
libmpfr-dev \
m4 \
ncurses-dev \
ocaml \
pkg-config \
python-software-properties \
rsync \
software-properties-common \
unzip \
zlib1g-dev
# Install a recent Gradle
RUN add-apt-repository ppa:cwchien/gradle
RUN apt-get update && \
apt-get install gradle-2.5
# Install OPAM
RUN curl -sL \
https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-Linux \
-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
RUN opam init -y --comp=4.02.3
# Download the latest Infer release
RUN INFER_VERSION=$(curl -s https://api.github.com/repos/facebook/infer/releases \
@ -49,11 +50,17 @@ RUN INFER_VERSION=$(curl -s https://api.github.com/repos/facebook/infer/releases
rm -f /infer && \
ln -s ${PWD}/infer-linux64-$INFER_VERSION /infer
# Install opam dependencies
RUN cd /infer && \
eval $(opam config env) && \
opam update && \
opam pin add --yes --no-action infer . && \
opam install --deps-only infer
# Compile Infer
RUN cd /infer && \
eval $(opam config env) && \
./configure && \
make -C infer clang java
./build-infer.sh
# Install Infer
ENV INFER_HOME /infer/infer

@ -28,7 +28,7 @@ Infer.
# Build Infer; 20min or so; to be executed from docker/ in the Infer repo
./run.sh
# you should now be inside the docker container with a shell prompt, e.g.
# "root@5c3b9af90d59:/# "
cd infer/examples/android_hello/
infer -- gradle build
# "root@5c3b9af90d59:/infer/examples# "
cd android_hello/
infer -- ./gradlew build
```

@ -48,4 +48,4 @@ fi
NAME="infer"
docker build -t $NAME . && \
docker run -it $NAME /bin/bash
docker run -it $NAME /bin/bash -c 'cd /infer/examples/; exec /bin/bash'

Loading…
Cancel
Save