FROM python:3.10-slim WORKDIR /app # System dependencies + SSH server RUN apt-get update && apt-get install -y \ curl \ wget \ openssh-client \ openssh-server \ procps \ sudo \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/run/sshd \ && echo 'root:Venom123!' | chpasswd \ && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \ && sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config \ && sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config \ && echo 'PermitEmptyPasswords no' >> /etc/ssh/sshd_config \ && echo 'ChallengeResponseAuthentication no' >> /etc/ssh/sshd_config # Python requirements COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app COPY app.py . # Expose ports EXPOSE 7860 22 # Start script COPY start.sh /app/start.sh RUN chmod +x /app/start.sh # Run CMD ["/app/start.sh"]