74 lines
2.1 KiB
Docker
74 lines
2.1 KiB
Docker
# Set the base image to Ubuntu Xenial (16.04)
|
|
FROM ubuntu:xenial
|
|
|
|
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
|
|
|
|
# Install Packages required to build FAIL*
|
|
RUN apt-get update
|
|
RUN apt-get install -y \
|
|
build-essential \
|
|
libmysqlclient-dev \
|
|
protobuf-compiler \
|
|
libprotobuf-dev \
|
|
libpcl1-dev \
|
|
libboost-thread-dev \
|
|
libboost-system-dev \
|
|
libboost-regex-dev \
|
|
libboost-coroutine-dev \
|
|
libboost-context-dev \
|
|
libdwarf-dev \
|
|
libelf-dev \
|
|
libfontconfig1-dev \
|
|
zlib1g-dev \
|
|
binutils-dev \
|
|
libiberty-dev \
|
|
llvm-3.9-dev \
|
|
clang-3.9 \
|
|
libsdl1.2-dev \
|
|
libgtk2.0-dev \
|
|
libwxgtk3.0-dev \
|
|
libncurses5-dev \
|
|
|
|
cmake \
|
|
cmake-curses-gui \
|
|
doxygen \
|
|
git \
|
|
screen \
|
|
wget \
|
|
openssh-server \
|
|
vim \
|
|
ranger
|
|
|
|
# Symlink clang++ to match docs
|
|
RUN ln -sf /usr/bin/clang++-3.9 /usr/bin/clang++
|
|
|
|
# Add a user for compiling FAIL*
|
|
RUN useradd fail; mkdir /home/fail; chown fail /home/fail
|
|
RUN echo 'fail:fail' | chpasswd; chsh fail --shell /bin/bash
|
|
RUN adduser fail sudo
|
|
|
|
# SSH login fix. Otherwise user is kicked off after login
|
|
RUN mkdir /var/run/sshd
|
|
RUN 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
|
|
|
|
# Get AspectC++ (originally v1.2) for 64 Bit
|
|
ARG acversion="2.0"
|
|
RUN wget http://www.aspectc.org/releases/"$acversion"/ac-bin-linux-x86-64bit-"$acversion".tar.gz
|
|
RUN tar xvzf ac-bin-linux-x86-64bit-"$acversion".tar.gz; mkdir bin; mv aspectc++/ac++ aspectc++/ag++ bin/; rm -rf aspectc++
|
|
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
# Clone FAIL*
|
|
RUN git clone https://github.com/danceos/fail.git
|
|
WORKDIR fail
|
|
|
|
USER root
|
|
EXPOSE 22
|
|
CMD ["/usr/sbin/sshd", "-D"]
|