add dockerfile/composefile/targets for externally built fail
This commit is contained in:
94
fail-env.dockerfile
Normal file
94
fail-env.dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user