-
-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathDockerfile.tools
More file actions
52 lines (47 loc) · 2.72 KB
/
Copy pathDockerfile.tools
File metadata and controls
52 lines (47 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright (C) 2017-2022, Cyberhaven
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# This creates the build environment for guest tools.
FROM ubuntu:22.04 AS s2e-build-env-tools
# Install build dependencies.
# The unzip and libgomp1 dependencies are needed to unzip and run binary Z3
# distributions.
RUN apt-get update && dpkg --add-architecture i386 && apt-get update && \
apt-get -y install sudo git ca-certificates build-essential cmake curl wget texinfo flex bison \
python-is-python3 python3-dev python3-venv python3-distro mingw-w64 lsb-release \
autoconf libtool libprotobuf-dev protobuf-compiler protobuf-c-compiler \
libdwarf-dev libelf-dev libelf-dev:i386 \
libboost-dev zlib1g-dev libjemalloc-dev nasm pkg-config \
libmemcached-dev libpq-dev libc6-dev-i386 binutils-dev \
libboost-system-dev libboost-serialization-dev libboost-regex-dev \
libbsd-dev libpixman-1-dev \
libglib2.0-dev libglib2.0-dev:i386 python3-docutils libpng-dev \
gcc-multilib g++-multilib libgomp1 unzip libzstd-dev \
libgmock-dev libgtest-dev libsoci-dev libcapstone-dev \
libcurl4-openssl-dev \
libedit-dev \
libpfm4-dev \
clang-15
# This scripts allows running commands as a host user inside the container.
# For example, guest tools can be built as follows:
# cd $HOME/s2e/env/source/s2e
# docker build --target s2e-build-env -t s2e-build-env .
# cd $HOME/s2e/env/build
# docker run -ti --rm -e SYSTEM_CLANG_VERSION=19 -e S2E_PREFIX="$HOME/s2e/env/install" -w $(pwd) -v $HOME:$HOME s2e-build-env /run_as.sh $(id -u) $(id -g) make -f $HOME/s2e/env/source/s2e/Makefile.tools install
COPY scripts/run_as.sh /