dockerfile: finally produce a working dockerfile
This commit is contained in:
@ -1,20 +1,21 @@
|
||||
# Inherit from docker container that has the fail source code prepared,
|
||||
# including all tools which are needed to build FAIL*
|
||||
FROM danceos/fail-base
|
||||
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
|
||||
|
||||
LABEL org.opencontainers.image.authors="Christian Dietrich <stettberger@dokucode.de>"
|
||||
|
||||
USER fail
|
||||
|
||||
# Configure the Weather Monitor Experiment
|
||||
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
ENV PATH=/home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
WORKDIR /home/fail/fail
|
||||
RUN mkdir build-tracer; cd build-tracer
|
||||
RUN mkdir build-tracer && cd build-tracer
|
||||
WORKDIR build-tracer
|
||||
|
||||
RUN cmake \
|
||||
-DAGXX=/home/fail/bin/ag++ \
|
||||
-DBOOST_THREAD_LIBRARY=/usr/lib/x86_64-linux-gnu/libpthread.so \
|
||||
|
||||
# Enable / Disable features \
|
||||
-DBUILD_ARM=OFF \
|
||||
-DBUILD_BOCHS=ON \
|
||||
-DBUILD_CAPSTONE_DISASSEMBLER=OFF \
|
||||
@ -32,17 +33,16 @@ RUN cmake \
|
||||
-DBUILD_QEMU=OFF \
|
||||
-DBUILD_T32=OFF \
|
||||
-DBUILD_X86=ON \
|
||||
|
||||
# \
|
||||
-DCLIENT_JOB_INITIAL=1 \
|
||||
-DCLIENT_JOB_LIMIT=1000 \
|
||||
-DCLIENT_JOB_REQUEST_SEC=30 \
|
||||
-DCLIENT_RAND_BACKOFF_TEND=8 \
|
||||
-DCLIENT_RAND_BACKOFF_TSTART=3 \
|
||||
-DCLIENT_RETRY_COUNT=3 \
|
||||
|
||||
# ;-separated list
|
||||
# ;-separated list \
|
||||
-DCMAKE_AGPP_FLAGS="-D__NO_MATH_INLINES" \
|
||||
|
||||
# \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DCONFIG_BOCHS_COMPRESS_STATE=ON \
|
||||
@ -67,18 +67,16 @@ RUN cmake \
|
||||
-DCONFIG_SR_SAVE=ON \
|
||||
-DCONFIG_SUPPRESS_INTERRUPTS=ON \
|
||||
-DENABLE_DATABASE_TESTS=OFF \
|
||||
|
||||
# ;-separated list
|
||||
# ;-separated list \
|
||||
-DEXPERIMENTS_ACTIVATED="generic-tracing" \
|
||||
|
||||
# \
|
||||
-DLibIberty_INCLUDE_DIRS=/usr/include/libiberty \
|
||||
-DLibIberty_LIBRARIES=/usr/lib/x86_64-linux-gnu/libiberty.a \
|
||||
-DMYSQL_CONFIG=/usr/bin/mysql_config \
|
||||
-DMYSQL_CONFIG_PREFER_PATH=/bin \
|
||||
|
||||
# ;-separated list
|
||||
# ;-separated list \
|
||||
-DPLUGINS_ACTIVATED="tracing;serialoutput" \
|
||||
|
||||
# \
|
||||
-DSERVER_COMM_HOSTNAME=localhost \
|
||||
-DSERVER_COMM_TCP_PORT=1111 \
|
||||
-DSERVER_OUT_QUEUE_SIZE=0 \
|
||||
@ -92,26 +90,25 @@ RUN cmake \
|
||||
-DTEST_MYSQL_USER=fail_test \
|
||||
-DVERBOSE_MAKE=OFF \
|
||||
-D_filename=/usr/include/wx-3.0/wx/version.h \
|
||||
|
||||
# ;-separated list
|
||||
# ;-separated list \
|
||||
-Dbochs_configure_params="--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-nogui;--with-x11;--with-wx;--with-sdl" \
|
||||
|
||||
# \
|
||||
-Dbochs_install_prefix=/home/fail/fail/simulators/bochs/install \
|
||||
..
|
||||
|
||||
# We need to manually build Bochs first to generate the bochs/config.h - the external_project configure step
|
||||
# (where this file is generated) is run at build time (not configure time), but the build order is not defined correctly.
|
||||
RUN cmake --build . --target libfailbochs_external-configure -- -j$(nproc)
|
||||
# RUN cmake --build . --target libfailbochs_external-configure \
|
||||
# && cmake --build .
|
||||
RUN cmake --build . --target libfailbochs_external-configure -- -j$(nproc) \
|
||||
&& cmake --build . -- -j$(nproc)
|
||||
|
||||
# Make FAIL*
|
||||
RUN cmake --build . -- -j$(nproc)
|
||||
|
||||
RUN ln -s /home/fail/fail/build-tracer/bin/fail-client /home/fail/bin/fail-x86-tracing; \
|
||||
ln -s /home/fail/fail/build-tracer/bin/import-trace /home/fail/bin/; \
|
||||
ln -s /home/fail/fail/build-tracer/bin/prune-trace /home/fail/bin/; \
|
||||
ln -s /home/fail/fail/build-tracer/bin/dump-trace /home/fail/bin/; \
|
||||
ln -s /home/fail/fail/build-tracer/bin/convert-trace /home/fail/bin/; \
|
||||
cp /home/fail/fail/tools/bochs-experiment-runner/bochs-experiment-runner.py /home/fail/bin/bochs-experiment-runner.py; \
|
||||
chmod a+x /home/fail/bin/bochs-experiment-runner.py;
|
||||
RUN ln -s /home/fail/fail/build-tracer/bin/fail-client /home/fail/bin/fail-x86-tracing \
|
||||
&& ln -s /home/fail/fail/build-tracer/bin/import-trace /home/fail/bin/ \
|
||||
&& ln -s /home/fail/fail/build-tracer/bin/prune-trace /home/fail/bin/ \
|
||||
&& ln -s /home/fail/fail/build-tracer/bin/dump-trace /home/fail/bin/ \
|
||||
&& ln -s /home/fail/fail/build-tracer/bin/convert-trace /home/fail/bin/ \
|
||||
&& cp /home/fail/fail/tools/bochs-experiment-runner/bochs-experiment-runner.py /home/fail/bin/bochs-experiment-runner.py \
|
||||
&& chmod a+x /home/fail/bin/bochs-experiment-runner.py
|
||||
|
||||
USER root
|
||||
|
||||
Reference in New Issue
Block a user