Skip to content

Commit

Permalink
updates vagrant/docker files (BinaryAnalysisPlatform#928)
Browse files Browse the repository at this point in the history
* updates docker and vagrant files

* added libncurses install

* removed bubblewrap building from Dockerfiles

* minor updates

* quotes added

* don't delete libncurses
  • Loading branch information
gitoleg authored and ivg committed Mar 22, 2019
1 parent 689335e commit 3cacae7
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 44 deletions.
38 changes: 27 additions & 11 deletions docker/debian/testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
FROM ocaml/opam:debian
FROM ocaml/opam2:debian-stable

MAINTAINER Ivan Gotovchits <ivg@ieee.org>

RUN sudo apt-get -y update && sudo apt-get -y install \
llvm-3.8-dev \
build-essential \
curl \
git \
libcurl4-gnutls-dev \
libgmp-dev \
zlib1g-dev \
binutils-multiarch \
clang
RUN opam init --auto-setup --comp=4.05.0 --yes
libx11-dev \
m4 \
pkg-config \
python-pip \
software-properties-common \
sudo \
unzip \
wget \
libcap-dev \
gcc \
make \
libncurses5-dev

RUN opam switch 4.05
RUN eval "$(opam env)"
RUN opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
RUN LLVM_CONFIG=llvm-config-3.8 opam install conf-bap-llvm --yes
RUN OPAMJOBS=16 opam install bap --yes
RUN sudo apt-get install python-pip --yes
RUN opam update
RUN opam install depext --yes
RUN OPAMJOBS=1 opam depext --install bap --yes
RUN sudo pip install bap

WORKDIR /home/opam

ENTRYPOINT ["opam", "config", "exec", "--"]
22 changes: 16 additions & 6 deletions docker/trusty/testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:trusty
MAINTAINER Ivan Gotovchits <ivg@ieee.org>

RUN apt-get -y update && apt-get -y install \
build-essential \
curl \
Expand All @@ -11,20 +12,29 @@ RUN apt-get -y update && apt-get -y install \
software-properties-common \
sudo \
unzip \
wget
RUN add-apt-repository --yes ppa:avsm/ppa && apt-get update && apt-get -y install \
ocaml \
ocaml-native-compilers \
opam
wget \
libcap-dev \
gcc \
make \
libncurses5-dev

RUN useradd -m bap && echo "bap:bap" | chpasswd && adduser bap sudo
RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
/etc/sudoers
USER bap
WORKDIR /home/bap
RUN opam init --auto-setup --comp=4.05.0 --yes

RUN wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
RUN echo "" | sh ./install.sh
RUN opam --version

RUN opam init --yes --compiler=4.05.0 --disable-sandboxing
RUN eval "$(opam env)"
RUN opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
RUN opam update
RUN opam install depext --yes
RUN OPAMJOBS=1 opam depext --install bap --yes
RUN sudo pip install bap

ENTRYPOINT ["opam", "config", "exec", "--"]
19 changes: 16 additions & 3 deletions docker/xenial/testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM ubuntu:xenial
MAINTAINER Ivan Gotovchits <ivg@ieee.org>

RUN apt-get -y update && apt-get -y install \
build-essential \
curl \
Expand All @@ -11,17 +12,29 @@ RUN apt-get -y update && apt-get -y install \
software-properties-common \
sudo \
unzip \
wget
RUN apt-get -y install opam
wget \
libcap-dev \
gcc \
make \
libncurses5-dev

RUN useradd -m bap && echo "bap:bap" | chpasswd && adduser bap sudo
RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
/etc/sudoers
USER bap
WORKDIR /home/bap
RUN opam init --auto-setup --comp=4.05.0 --yes

RUN wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
RUN echo "" | sh ./install.sh
RUN opam --version

RUN opam init --yes --compiler=4.05.0 --disable-sandboxing
RUN eval "$(opam env)"
RUN opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#testing
RUN opam update
RUN opam install depext --yes
RUN OPAMJOBS=1 opam depext --install bap --yes
RUN sudo pip install bap

ENTRYPOINT ["opam", "config", "exec", "--"]
24 changes: 11 additions & 13 deletions vagrant/jessie64/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ Vagrant.configure(2) do |config|
vb.memory = "4096"
end
config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo apt-get -y update && sudo apt-get -y install \
llvm-3.8-dev \
git \
libcurl4-gnutls-dev \
libgmp-dev \
zlib1g-dev \
binutils-multiarch \
clang \
time
opam init --auto-setup --comp=4.05.0 --yes
eval `opam config env`
LLVM_CONFIG=llvm-config-3.8 opam install conf-bap-llvm --yes
opam install bap --yes
sudo apt-get update
sudo apt-get install curl make git m4 libcap-dev gcc unzip --yes
echo "" | sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
yes | opam init --compiler=4.05.0 --disable-sandboxing
eval $(opam env)
opam install depext --yes
opam depext bap -i --yes
sudo apt-get install python-pip --yes
sudo pip install bap
SHELL
Expand Down
21 changes: 15 additions & 6 deletions vagrant/trusty64/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ Vagrant.configure(2) do |config|
vb.memory = "4096"
end
config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo add-apt-repository --yes ppa:avsm/ppa
sudo apt-get update
sudo apt-get --yes install opam
opam init --auto-setup --comp=4.05.0 --yes
opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#bap-1.4
eval `opam config env`
opam depext bap --install --yes
sudo apt-get install make git m4 libcap-dev gcc unzip libncurses5-dev --yes
wget https://github.com/projectatomic/bubblewrap/releases/download/v0.3.1/bubblewrap-0.3.1.tar.xz
tar xvf bubblewrap-0.3.1.tar.xz
cd bubblewrap-0.3.1
./configure && make && sudo make install
cd ../
echo "" | sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
yes | opam init --compiler=4.05.0
eval $(opam env)
opam install depext --yes
opam depext bap -i --yes
sudo apt-get install python-pip --yes
sudo pip install bap
SHELL
Expand Down
20 changes: 15 additions & 5 deletions vagrant/xenial64/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ Vagrant.configure(2) do |config|
end
config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo apt-get update
sudo apt-get --yes install opam
opam init --auto-setup --comp=4.05.0 --yes
opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository#bap-1.4
eval `opam config env`
opam depext bap --install --yes
sudo apt-get install make git m4 libcap-dev gcc unzip libncurses5-dev --yes
wget https://github.com/projectatomic/bubblewrap/releases/download/v0.3.1/bubblewrap-0.3.1.tar.xz
tar xvf bubblewrap-0.3.1.tar.xz
cd bubblewrap-0.3.1
./configure && make && sudo make install
cd ../
echo "" | sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
yes | opam init --compiler=4.05.0
eval $(opam env)
opam install depext --yes
opam depext bap -i --yes
sudo apt-get install python-pip --yes
sudo pip install bap
SHELL
Expand Down

0 comments on commit 3cacae7

Please sign in to comment.