FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends openssh-server sudo ca-certificates nano file htop vim \ && rm -rf /var/lib/apt/lists/* RUN mkdir /var/run/sshd RUN useradd -m -s /bin/bash crime1 RUN useradd -m -s /bin/bash crime2 RUN useradd -m -s /bin/bash crime3 RUN useradd -m -s /bin/bash crime4 RUN useradd -m -s /bin/bash crime5 RUN mkdir -p /home/crime1 RUN chown -R crime1:crime1 /home/crime1 RUN mkdir -p /home/crime2 RUN chown -R crime2:crime2 /home/crime2 RUN mkdir -p /home/crime3 RUN chown -R crime3:crime3 /home/crime3 RUN mkdir -p /home/crime4 RUN chown -R crime4:crime4 /home/crime4 RUN mkdir -p /home/crime5 RUN chown -R crime5:crime5 /home/crime5 RUN echo "crime1:crime1" | chpasswd RUN echo "crime2:&Vs@gSfdC+SPh!{BkBSt$~9{" | chpasswd RUN echo "crime3:CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv" | chpasswd RUN echo "crime4:crime4" | chpasswd RUN echo "crime5:crime5" | chpasswd COPY /Level/Level1/Chat.txt /home/crime1/.Chats/Chat.txt RUN chown crime1:crime1 /home/crime1/.Chats/Chat.txt && chmod 600 /home/crime1/.Chats/Chat.txt COPY /Level/Level2/data.txt /home/crime2/data.txt RUN chown crime2:crime2 /home/crime2/data.txt && chmod 600 /home/crime2/data.txt RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config RUN mkdir -p /guide RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\e[37m✧\e[0m \e[31mEin unfreundliches Willkommen im Escape Room\e[0m \e[37m✧\e[0m\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\033[1;38;2;107;114;128mACHTUNG!\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mIn wenigen Augenblicken wird dein PC ausgelöscht\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mes sei denn, du bestehst diese Prüfung. Vor dir liegen\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128m5 Level, und in jedem musst du in einer unheimlichen\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mLinux-Umgebung ein verborgenes Passwort finden.\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mNur dann kannst du deinen PC retten.\033[0m\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mAktuelles Level: \033[0m\033[37m1\033[0m\n" >> /guide/crime1.txt RUN printf "\033[38;2;107;114;128mTipp: \033[0m\033[37m…\033[0m\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" >> /guide/crime1.txt RUN echo "crime2" > /guide/crime2.txt RUN echo 'if [ -f "/guide/$(whoami).txt" ]; then cat "/guide/$(whoami).txt"; fi' >> /etc/bash.bashrc COPY motd /etc/motd EXPOSE 22 CMD ["/usr/sbin/sshd","-D"]