Dockerfile aktualisiert
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -36,26 +36,26 @@ RUN echo "crime3:CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv" | chpasswd
|
|||||||
RUN echo "crime4:crime4" | chpasswd
|
RUN echo "crime4:crime4" | chpasswd
|
||||||
RUN echo "crime5:crime5" | chpasswd
|
RUN echo "crime5:crime5" | chpasswd
|
||||||
|
|
||||||
|
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||||
|
RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config
|
||||||
|
|
||||||
|
# Level1
|
||||||
COPY /Level/Level1/Chat.txt /home/crime1/.Chats/Chat.txt
|
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
|
RUN chown crime1:crime1 /home/crime1/.Chats/Chat.txt && chmod 600 /home/crime1/.Chats/Chat.txt
|
||||||
|
|
||||||
|
# Level2
|
||||||
COPY /Level/Level2/data.txt /home/crime2/data.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 chown crime2:crime2 /home/crime2/data.txt && chmod 600 /home/crime2/data.txt
|
||||||
|
|
||||||
|
|
||||||
# Level5
|
# Level5
|
||||||
COPY Level/Level5/systemd-hdtob.py /usr/local/bin/systemd-hdtob.py
|
COPY Level/Level5/systemd-hdtob.py /usr/local/bin/systemd-hdtob.py
|
||||||
RUN chmod +x /usr/local/bin/systemd-hdtob.py
|
RUN chmod +x /usr/local/bin/systemd-hdtob.py
|
||||||
|
|
||||||
|
|
||||||
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
# motd
|
||||||
RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config
|
|
||||||
|
|
||||||
|
|
||||||
RUN rm -fr /etc/update-motd.d/*
|
RUN rm -fr /etc/update-motd.d/*
|
||||||
RUN mkdir -p /guide
|
RUN mkdir -p /guide
|
||||||
|
|
||||||
|
|
||||||
RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime1.txt
|
RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime1.txt
|
||||||
RUN printf "\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 "\e[37m✧\e[0m \e[31mEin unfreundliches Willkommen im Escape Room\e[0m \e[37m✧\e[0m\n" >> /guide/crime1.txt
|
||||||
@@ -77,11 +77,9 @@ RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣
|
|||||||
RUN echo "crime2" > /guide/crime2.txt
|
RUN echo "crime2" > /guide/crime2.txt
|
||||||
RUN echo 'if [ -f "/guide/$(whoami).txt" ]; then cat "/guide/$(whoami).txt"; fi' >> /etc/bash.bashrc
|
RUN echo 'if [ -f "/guide/$(whoami).txt" ]; then cat "/guide/$(whoami).txt"; fi' >> /etc/bash.bashrc
|
||||||
|
|
||||||
# Skript für Typanimation
|
|
||||||
COPY guide/crime5/typewrite.sh /usr/local/bin/typewrite.sh
|
COPY guide/crime5/typewrite.sh /usr/local/bin/typewrite.sh
|
||||||
RUN chmod +x /usr/local/bin/typewrite.sh
|
RUN chmod +x /usr/local/bin/typewrite.sh
|
||||||
|
|
||||||
# Login-Hook für crime5
|
|
||||||
RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' >> /home/crime5/.bashrc \
|
RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' >> /home/crime5/.bashrc \
|
||||||
&& chown crime5:crime5 /home/crime5/.bashrc
|
&& chown crime5:crime5 /home/crime5/.bashrc
|
||||||
|
|
||||||
@@ -92,14 +90,12 @@ RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' >
|
|||||||
|
|
||||||
RUN echo 'export PS1="\u@$(hostname):\\$ "' >> /etc/profile
|
RUN echo 'export PS1="\u@$(hostname):\\$ "' >> /etc/profile
|
||||||
|
|
||||||
|
|
||||||
RUN rm -f /etc/legal
|
RUN rm -f /etc/legal
|
||||||
RUN sed -i 's/^session\s\+optional\s\+pam_motd/#session optional pam_motd/' /etc/pam.d/sshd
|
RUN sed -i 's/^session\s\+optional\s\+pam_motd/#session optional pam_motd/' /etc/pam.d/sshd
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
|
||||||
|
|
||||||
COPY start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
RUN chmod +x /start.sh
|
RUN chmod +x /start.sh
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user