# Verwenden des Ubuntu-Basis-Images
FROM ubuntu:latest
# Setze das Arbeitsverzeichnis
WORKDIR /root
# Installiere Apache2, PHP, Python und OpenSSH-Server
RUN apt-get update && \
apt-get install -y apache2 php libapache2-mod-php python3 openssh-server && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Konfiguration des SSH-Servers
RUN mkdir /var/run/sshd && \
echo 'root:#password' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
# Apache2 und SSH-Server als Services starten
CMD service apache2 start && service ssh start && tail -f /dev/null