Summary: Latest version was 0.14.0. - re-use the new version in docker/master/Dockerfile for the most part, small change to download only the packages needed for running (instead of compiling) and to download the binary release instead of the source - Update to Debian testing to be able to run the distributed binaries directly. - remove "run.sh" script: the binaries have no examples to run infer on, so there's little value in executing the resulting docker image as-is. Instead, add instructions to mount local directories with a default to the source examples. - make master-java the same as master/ except Java-only Reviewed By: skcho Differential Revision: D30157282 fbshipit-source-id: 54eaff40fmaster
parent
b6278dfd7d
commit
e4c65eb2a1
@ -1,47 +0,0 @@
|
||||
FROM debian:stretch-slim
|
||||
|
||||
LABEL maintainer "Infer team"
|
||||
|
||||
# mkdir the man/man1 directory due to Debian bug #863199
|
||||
RUN apt-get update && \
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libc6-dev \
|
||||
libsqlite3-dev \
|
||||
opam \
|
||||
openjdk-8-jdk-headless \
|
||||
pkg-config \
|
||||
python2.7 \
|
||||
zlib1g-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download the latest Infer release
|
||||
RUN INFER_VERSION=v0.14.0; \
|
||||
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 OCAML_VERSION=4.06.1+flambda; \
|
||||
cd /infer && ./build-infer.sh --opam-switch $OCAML_VERSION && rm -rf /root/.opam
|
||||
|
||||
# Install Infer
|
||||
ENV INFER_HOME /infer/infer
|
||||
ENV PATH ${INFER_HOME}/bin:${PATH}
|
||||
|
||||
ENV ANDROID_HOME /opt/android-sdk-linux
|
||||
WORKDIR $ANDROID_HOME
|
||||
RUN curl -o sdk-tools-linux.zip \
|
||||
https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip && \
|
||||
unzip sdk-tools-linux.zip && \
|
||||
rm sdk-tools-linux.zip
|
||||
ENV PATH ${ANDROID_HOME}/tools/bin:${PATH}
|
||||
RUN echo "sdk.dir=${ANDROID_HOME}" > /infer/examples/android_hello/local.properties
|
@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
EXEC_NAME="$0"
|
||||
|
||||
show_usage() {
|
||||
echo "Usage: $EXEC_NAME [-h]"
|
||||
echo ""
|
||||
echo "Build and run the docker image. See infer/docker/README.md for more"
|
||||
echo "information."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h, --help Show this message and exit"
|
||||
}
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
arg="$1"
|
||||
case $arg in
|
||||
"-h" | "--help" )
|
||||
show_usage;
|
||||
exit 0;
|
||||
;;
|
||||
*)
|
||||
echo "unknown argument $1"
|
||||
show_usage;
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! docker --version > /dev/null; then
|
||||
echo "docker install not working"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f Dockerfile ]; then
|
||||
echo "Dockerfile not found. Are you in the right directory?"
|
||||
echo "Please see infer/docker/README.md for more information."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NAME="infer"
|
||||
|
||||
docker build -t $NAME . && \
|
||||
echo "*************************************************************" && \
|
||||
echo "To build the Android example, you must accept the Android SDK" && \
|
||||
echo "licenses by running 'sdkmanager --licenses' first." && \
|
||||
echo "*************************************************************" && \
|
||||
docker run -it $NAME /bin/bash -c 'cd /infer/examples/; exec /bin/bash'
|
@ -0,0 +1,27 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
LABEL maintainer "Infer team"
|
||||
|
||||
# mkdir the man/man1 directory due to Debian bug #863199
|
||||
RUN apt-get update && \
|
||||
mkdir -p /usr/share/man/man1 && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
curl \
|
||||
libc6-dev \
|
||||
openjdk-11-jdk-headless \
|
||||
sqlite3 \
|
||||
xz-utils \
|
||||
zlib1g-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download the Infer release
|
||||
RUN INFER_VERSION=v1.1.0; \
|
||||
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
|
||||
|
||||
# Install infer
|
||||
ENV PATH /infer/bin:${PATH}
|
Loading…
Reference in new issue