Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
cwe_checker
Commits
111a5590
Commit
111a5590
authored
Jan 28, 2019
by
Thomas Barabosch
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:fkie-cad/cwe_checker
parents
2c44f100
cf184143
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
37 deletions
+60
-37
Dockerfile
Dockerfile
+59
-36
install.sh
install.sh
+1
-1
No files found.
Dockerfile
View file @
111a5590
# based on https://github.com/BinaryAnalysisPlatform/bap/blob/master/docker/Dockerfile
FROM
phusion/baseimage:0.11
RUN
apt-get
-y
update
&&
install_clean
\
build-essential
\
curl
\
git
\
libx11-dev
\
m4
\
pkg-config
\
python-pip
\
python-setuptools
\
software-properties-common
\
sudo
\
unzip
\
wget
\
binutils-multiarch
\
clang
\
libgmp-dev
\
libzip-dev
\
llvm-6.0-dev
\
zlib1g-dev
RUN
wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
&&
yes /usr/local/bin | sh install.sh
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
RUN
apt-get
-y
update
\
&&
install_clean
sudo
\
&&
useradd
-m
bap
\
&&
echo
"bap:bap"
| chpasswd
\
&&
adduser bap
sudo
\
&&
sed
-i
.bkp
-e
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g'
/etc/sudoers
USER
bap
WORKDIR
/home/bap
ENV
PATH="/home/bap/.opam/4.05.0/bin/:${PATH}"
COPY
. /home/bap/cwe_checker/
RUN
sudo
apt-get
-y
update
\
&&
sudo
install_clean
\
binutils-multiarch
\
build-essential
\
clang
\
curl
\
git
\
libgmp-dev
\
libx11-dev
\
libzip-dev
\
llvm-6.0-dev
\
m4
\
pkg-config
\
software-properties-common
\
unzip
\
wget
\
zlib1g-dev
\
&&
wget https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh
\
&&
yes /usr/local/bin |
sudo
sh install.sh
\
# install Bap
RUN
opam init
--auto-setup
--comp
=
4.05.0
--disable-sandboxing
--yes
RUN
git clone
-b
testing
--single-branch
https://github.com/BinaryAnalysisPlatform/opam-repository.git
RUN
opam repo add bap opam-repository
&&
opam update
RUN
opam install depext
--yes
RUN
OPAMJOBS
=
1 opam depext
--install
bap
--yes
RUN
pip install bap
&& opam init --auto-setup --comp=4.05.0 --disable-sandboxing --yes \
&& git clone -b testing --depth 1 https://github.com/BinaryAnalysisPlatform/opam-repository.git \
&& opam repo add bap opam-repository \
&& opam update \
&& opam install depext --yes \
&& OPAMJOBS=1 opam depext --install bap --yes \
# install CWE_Checker and dependencies
RUN
OPAMJOBS
=
1 opam install yojson alcotest
--yes
COPY
. /home/bap/cwe_checker/
RUN
sudo
chown
-R
bap:bap /home/bap/cwe_checker
ENV
PATH="/home/bap/.opam/4.05.0/bin/:${PATH}"
&& OPAMJOBS=1 opam install yojson alcotest --yes \
&& sudo chown -R bap:bap /home/bap/cwe_checker \
&& cd /home/bap/cwe_checker/src \
&& bapbuild -r -Is checkers,utils -pkgs yojson,unix cwe_checker.plugin \
&& bapbundle install cwe_checker.plugin \
&& sudo apt-get remove -y \
build-essential \
clang \
curl \
gcc \
g++ \
git \
libgmp-dev \
libx11-dev \
libzip-dev \
llvm-6.0-dev \
unzip \
wget \
zlib1g-dev \
&& sudo apt-get -y autoremove \
&& sudo apt-get -y clean \
&& rm -rf /home/bap/.opam/4.05.0/.opam-switch/sources
WORKDIR
/home/bap/cwe_checker/src
RUN
bapbuild
-r
-Is
checkers,utils
-pkgs
yojson,unix cwe_checker.plugin
;
\
bapbundle install cwe_checker.plugin
;
ENTRYPOINT
["opam", "config", "exec", "--"]
install.sh
View file @
111a5590
...
...
@@ -5,6 +5,6 @@ rm -rf src/_build
rm
-f
src/cwe_checker.plugin
echo
"Building docker container"
docker build
--build-arg
http_proxy
=
$http_proxy
--build-arg
https_proxy
=
$https_proxy
--build-arg
HTTP_PROXY
=
$http_proxy
--build-arg
HTTPS_PROXY
=
$https_proxy
-t
cwe-checker
.
docker build
--build-arg
=
http
{
,s
}
_proxy
--build-arg
=
HTTP
{
,S
}
_PROXY
-t
cwe-checker
.
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment