add dockerfile/composefile/targets for externally built fail

This commit is contained in:
2026-03-11 14:54:06 +01:00
parent 47f302c915
commit 244824de85
5 changed files with 140 additions and 5 deletions

View File

@ -3,11 +3,20 @@ docker:
docker build -t gitea.vps.chriphost.de/christoph/fail-generic-tracing:latest -f fail-generic-tracing.dockerfile .
docker build -t gitea.vps.chriphost.de/christoph/fail-demo:latest -f fail-demo.dockerfile . --build-arg CACHE_DATE="$(shell date)"
docker-env:
docker build -t gitea.vps.chriphost.de/christoph/fail-env:latest -f fail-env.dockerfile .
run:
docker compose up -d --force-recreate --renew-anon-volumes -y
docker compose -f docker-compose.yaml up -d --force-recreate --renew-anon-volumes -y
run-env:
docker compose -f docker-compose-env.yaml up -d --force-recreate --renew-anon-volumes -y
stop:
docker compose down
docker compose -f docker-compose.yaml down
stop-env:
docker compose -f docker-compose-env.yaml down
ssh:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 5022 fail@127.0.0.1

29
docker-compose-env.yaml Normal file
View File

@ -0,0 +1,29 @@
services:
fail-db:
image: mysql
container_name: fail-db
environment:
MYSQL_ROOT_PASSWORD: fail
MYSQL_USER: fail
MYSQL_PASSWORD: fail
MYSQL_DATABASE: fail
ports:
- "3306:3306"
networks:
- fail-network
fail-env:
image: gitea.vps.chriphost.de/christoph/fail-env:latest
container_name: fail-env
ports:
- "5000:5000" # Result Browser
- "5022:22" # SSH
networks:
- fail-network
volumes:
- "../3 Wasm:/home/fail/build"
- "../8 FailMars:/home/fail/mars"
networks:
fail-network:
driver: bridge

View File

@ -21,7 +21,8 @@ services:
networks:
- fail-network
volumes:
- "../3 Wasm:/home/fail/fail-wasm-root"
- "../3 Wasm:/home/fail/build"
- "../8 FailMars:/home/fail/mars"
networks:
fail-network:

View File

@ -49,7 +49,8 @@ RUN git clone https://github.com/llvm/llvm-project.git && cd llvm-project \
&& cd / && rm -rf ./llvm-project
# Install packages required to build FAIL*
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
# binutils-dev \
libmysqlclient-dev \
libprotobuf-dev \
@ -79,7 +80,8 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-inst
libasound2-dev
# Install packages required to run FAIL*
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
protobuf-compiler \
libtinfo6 \
# libtinfo5 \

94
fail-env.dockerfile Normal file
View File

@ -0,0 +1,94 @@
FROM ubuntu:noble
# Install basic packages
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
cmake-curses-gui \
wget \
git \
doxygen \
screen \
openssh-server \
neovim \
ranger \
# binutils-dev \
libmysqlclient-dev \
libcapstone4 \
libprotobuf-dev \
libtinfo-dev \
# libpcl1-dev \
libdwarf-dev \
libelf-dev \
libiberty-dev \
libboost-thread1.74-dev \
libboost-system1.74-dev \
libboost-regex1.74-dev \
libboost-coroutine1.74-dev \
libboost-context1.74-dev \
libfontconfig1-dev \
zlib1g-dev \
libz3-dev \
libsdl1.2-dev \
# libsdl2-dev \
libgtk2.0-dev \
# libgtk-3-dev \
# libwxbase3.0-dev \
# libwxgtk3.0-gtk3-dev \
libncurses-dev \
# libncurses5-dev \
libx11-dev \
xorg-dev \
libasound2-dev \
protobuf-compiler \
libtinfo6 \
# libtinfo5 \
libmariadb3 \
libprotobuf32t64 \
libncurses6 \
grub-common \
xorriso \
grub-pc-bin \
mysql-client \
unzip \
bochs \
python3-setuptools \
python3-flask \
python3-mysqldb \
python3-yaml
RUN wget -O "libpcl1.deb" "http://archive.ubuntu.com/ubuntu/pool/universe/libp/libpcl1/libpcl1_1.12-2_amd64.deb" \
&& dpkg -i "libpcl1.deb" \
&& rm -f "libpcl1.deb"
# Fix shebangs
RUN ln -sf /usr/bin/python3 /usr/bin/python
# Add a user for compiling FAIL*
RUN useradd fail \
&& mkdir /home/fail && chown fail /home/fail \
&& echo 'fail:fail' | chpasswd && chsh fail --shell /bin/bash \
&& adduser fail sudo
# SSH login fix. Otherwise user is kicked off after login
RUN mkdir /var/run/sshd \
&& sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE="in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
USER fail
ENV HOME=/home/fail
WORKDIR /home/fail
USER root
# Password for MySQL Daemon
ADD my.cnf /home/fail/.my.cnf
RUN chown fail /home/fail/.my.cnf
# Accept SSH connections
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]